![]() |
LeechCraft Azoth 0.6.70-17609-g3dde4097dd
Modular multiprotocol IM plugin for LeechCraft
|
A general GPG error. More...
#include "gpgexceptions.h"
Public Member Functions | |
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. | |
General (int code, const QString &msg) | |
Constructs the error with the given code and error message. | |
const QString & | GetContext () const |
Returns the context of the error. | |
int | GetCode () const |
Returns the error code, if applicable. | |
const QString & | GetMessage () const |
Returns the human-readable error message. |
A general GPG error.
An error has a context (i. e. what was trying to be performed), an error message and an optional error code, if applicable, or -1 otherwise.
There are some more specific classes deriving from this one for more specific error cases:
This class hierarchy has been designed to be used either with usual C++ exceptions or with monadic error handling (see Util::Either). There is an algebraic sum type for the latter which can be pattern-matched using Util::Visit(), see AnyException_t.
Definition at line 37 of file gpgexceptions.h.
|
inline |
Constructs the error with the given context description.
[in] | context | The context of the error. |
Definition at line 48 of file gpgexceptions.h.
Referenced by LC::Azoth::GPGExceptions::Encryption::Encryption(), General(), and LC::Azoth::GPGExceptions::NullPubkey::NullPubkey().
|
inline |
Constructs the error with the given context, code and error message.
[in] | context | The context of the error. |
[in] | code | The error code. |
[in] | message | The human-readable error message. |
Definition at line 61 of file gpgexceptions.h.
|
inline |
Constructs the error with the given code and error message.
[in] | code | The error code. |
[in] | msg | The human-readable error message. |
Definition at line 78 of file gpgexceptions.h.
References General().
|
inline |
Returns the error code, if applicable.
Definition at line 96 of file gpgexceptions.h.
|
inline |
Returns the context of the error.
Definition at line 87 of file gpgexceptions.h.
|
inline |
Returns the human-readable error message.
Definition at line 105 of file gpgexceptions.h.