Exception and non exception based decoding

This commit is contained in:
Arun M 2017-12-16 18:50:44 +05:30
parent 7a511c46fe
commit c484ced63d
4 changed files with 53 additions and 6 deletions

View file

@ -43,6 +43,8 @@ struct DecodeErrorCategory: std::error_category
{
switch (static_cast<DecodeErrc>(ev))
{
case DecodeErrc::EmptyAlgoList:
return "empty algorithm list";
case DecodeErrc::AlgHeaderMiss:
return "missing algorithm header";
case DecodeErrc::TypHeaderMiss:
@ -82,6 +84,8 @@ struct VerificationErrorCategory: std::error_category
return "invalid audience";
case VerificationErrc::ImmatureSignature:
return "immature signature";
case VerificationErrc::InvalidSignature:
return "invalid signature";
};
assert (0 && "Code not reached");