mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-15 01:08:31 +00:00
Added exception handling and test for key/secret not present
This commit is contained in:
parent
99f3c1db86
commit
a5e18cc4f4
4 changed files with 42 additions and 12 deletions
|
@ -58,17 +58,31 @@ public:
|
|||
|
||||
/**
|
||||
*/
|
||||
class SignatureFormatError final : public std::runtime_error
|
||||
class SignatureFormatError final : public DecodeError
|
||||
{
|
||||
public:
|
||||
/**
|
||||
*/
|
||||
SignatureFormatError(std::string msg)
|
||||
: std::runtime_error(std::move(msg))
|
||||
: DecodeError(std::move(msg))
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*/
|
||||
class KeyNotPresentError final : public DecodeError
|
||||
{
|
||||
public:
|
||||
/**
|
||||
*/
|
||||
KeyNotPresentError(std::string msg)
|
||||
: DecodeError(std::move(msg))
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
class VerificationError : public std::runtime_error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue