LeechCraft Azoth 0.6.70-17609-g3dde4097dd
Modular multiprotocol IM plugin for LeechCraft
Loading...
Searching...
No Matches
LC::Azoth::GPGExceptions::General Class Reference

A general GPG error. More...

#include "gpgexceptions.h"

Inheritance diagram for LC::Azoth::GPGExceptions::General:
Collaboration diagram for LC::Azoth::GPGExceptions::General:

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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ General() [1/3]

LC::Azoth::GPGExceptions::General::General ( const QString & context)
inline

Constructs the error with the given context description.

Parameters
[in]contextThe 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().

Here is the caller graph for this function:

◆ General() [2/3]

LC::Azoth::GPGExceptions::General::General ( const QString & context,
int code,
const QString & message )
inline

Constructs the error with the given context, code and error message.

Parameters
[in]contextThe context of the error.
[in]codeThe error code.
[in]messageThe human-readable error message.

Definition at line 61 of file gpgexceptions.h.

◆ General() [3/3]

LC::Azoth::GPGExceptions::General::General ( int code,
const QString & msg )
inline

Constructs the error with the given code and error message.

Parameters
[in]codeThe error code.
[in]msgThe human-readable error message.

Definition at line 78 of file gpgexceptions.h.

References General().

Here is the call graph for this function:

Member Function Documentation

◆ GetCode()

int LC::Azoth::GPGExceptions::General::GetCode ( ) const
inline

Returns the error code, if applicable.

Returns
The error code, if applicable, or -1 otherwise.

Definition at line 96 of file gpgexceptions.h.

◆ GetContext()

const QString & LC::Azoth::GPGExceptions::General::GetContext ( ) const
inline

Returns the context of the error.

Returns
The context of the error.

Definition at line 87 of file gpgexceptions.h.

◆ GetMessage()

const QString & LC::Azoth::GPGExceptions::General::GetMessage ( ) const
inline

Returns the human-readable error message.

Returns
The error message.

Definition at line 105 of file gpgexceptions.h.


The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/leechcraft-doc-0.6.70+git.17609.g3dde4097dd-build/leechcraft-0.6.70-17609-g3dde4097dd/src/plugins/azoth/interfaces/azoth/gpgexceptions.h