mirror of
https://github.com/allankoechke/cpp-jwt.git
synced 2026-12-01 17:15:32 +00:00
'str_to_type' has a non-throwing exception specification but can still throw #31
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user