'str_to_type' has a non-throwing exception specification but can still throw #31

This commit is contained in:
Arun M 2018-09-29 00:24:08 +05:30
parent 129731da56
commit e5ecca4f38

View file

@ -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;
}