Sourcemeta Core 0.0.0
Loading...
Searching...
No Matches
jose_error.h
1#ifndef SOURCEMETA_CORE_JOSE_ERROR_H_
2#define SOURCEMETA_CORE_JOSE_ERROR_H_
3
4#ifndef SOURCEMETA_CORE_JOSE_EXPORT
5#include <sourcemeta/core/jose_export.h>
6#endif
7
8#include <sourcemeta/core/error.h>
9
10namespace sourcemeta::core {
11
12SOURCEMETA_CORE_ERROR_WARNINGS_PUSH
13
16class SOURCEMETA_CORE_JOSE_EXPORT JWKParseError : public Error {
17public:
18 JWKParseError() noexcept : Error{"The input is not a valid JSON Web Key"} {}
19};
20
23class SOURCEMETA_CORE_JOSE_EXPORT JWKSParseError : public Error {
24public:
25 JWKSParseError() noexcept
26 : Error{"The input is not a valid JSON Web Key Set"} {}
27};
28
31class SOURCEMETA_CORE_JOSE_EXPORT JWTParseError : public Error {
32public:
33 JWTParseError() noexcept : Error{"The input is not a valid JSON Web Token"} {}
34};
35
38class SOURCEMETA_CORE_JOSE_EXPORT JWEParseError : public Error {
39public:
40 JWEParseError() noexcept
41 : Error{"The input is not a valid JSON Web Encryption object"} {}
42};
43
44SOURCEMETA_CORE_ERROR_WARNINGS_POP
45
46} // namespace sourcemeta::core
47
48#endif
Error(const StaticString message) noexcept
Construct the error given its message.
Definition error_base.h:84