 |
LeechCraft Azoth
0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
|
Go to the documentation of this file.
19 namespace GPGExceptions
37 class General :
public std::runtime_error
48 General (
const QString& context)
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 }
78 General (
int code,
const QString& msg)
79 :
General {
"Azoth GPG error", code, msg }
113 class NullPubkey :
public General
119 :
General {
"Azoth GPG: null pubkey" }
126 class Encryption :
public General
137 :
General {
"Azoth GPG encryption error", code, 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.
NullPubkey()
Constructs the error object.
const QString & GetContext() const
Returns the context of the error.
int GetCode() const
Returns the error code, if applicable.
std::optional< AnyException_t > MaybeException_t
A type representing a possibility of a GPG-related error.
const QString & GetMessage() const
Returns the human-readable error message.
std::variant< Encryption, NullPubkey, General > AnyException_t
A sum type of all the possible GPG-related errors.