19 namespace GPGExceptions
49 :
std::runtime_error { context.toStdString () }
50 , Context_ { context }
61 General (
const QString& context,
int code,
const QString& message)
64 context.toStdString () + std::to_string (code) +
": " + message.toStdString ()
66 , Context_ { context }
68 , Message_ { message }
79 :
General {
"Azoth GPG error", code, msg }
119 :
General {
"Azoth GPG: null pubkey" }
137 :
General {
"Azoth GPG encryption error", code, message }
An error resulting from a null (or unset) public key.
const QString & GetContext() const
Returns the context of the error.
General(int code, const QString &msg)
Constructs the error with the given code and error message.
Encryption(int code, const QString &message)
Constructs the error object using the error code and message.
General(const QString &context)
Constructs the error with the given context description.
General(const QString &context, int code, const QString &message)
Constructs the error with the given context, code and error message.
const QString & GetMessage() const
Returns the human-readable error message.
std::optional< AnyException_t > MaybeException_t
A type representing a possibility of a GPG-related error.
NullPubkey()
Constructs the error object.
std::variant< Encryption, NullPubkey, General > AnyException_t
A sum type of all the possible GPG-related errors.
int GetCode() const
Returns the error code, if applicable.