From e5ecca4f388bac4bc894a67ccb63844a2c54843b Mon Sep 17 00:00:00 2001 From: Arun M <arun11299@gmail.com> Date: Sat, 29 Sep 2018 00:24:08 +0530 Subject: [PATCH] 'str_to_type' has a non-throwing exception specification but can still throw #31 --- include/jwt/jwt.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/jwt/jwt.hpp b/include/jwt/jwt.hpp index 728dc5d..b6dae3d 100644 --- a/include/jwt/jwt.hpp +++ b/include/jwt/jwt.hpp @@ -66,9 +66,8 @@ inline enum type str_to_type(const jwt::string_view typ) noexcept if (!strcasecmp(typ.data(), "jwt")) return type::JWT; else if(!strcasecmp(typ.data(), "none")) return type::NONE; - throw std::runtime_error("Unknown token type"); - assert (0 && "Code not reached"); + return type::NONE; }