accounts-qt: Error Class Reference

accounts-qt 1.17

Public Types | Public Member Functions | List of all members
Error Class Reference

Base object definition for accounts error handling. More...

`#include <Accounts/Error>`

## Public Types
enum | ErrorType { NoError = 0 , Unknown , Database , Deleted , DatabaseLocked , AccountNotFound }
| Error codes for all the accounts errors. More...

## Public Member Functions
| Error ()
| Basic constructor.
| Error (const Error &src)
| Copy constructor.
| Error (ErrorType type, const QString &message=QString())
| Constructor.
Error & | operator= (const Error &src)
| Assignment operator.
virtual | ~Error ()
| Destructor.
ErrorType | type () const
QString | message () const

## Detailed Description

Base object definition for accounts error handling.

Definition at line 43 of file error.h.

## Member Enumeration Documentation

## ◆ ErrorType

enum ErrorType

Error codes for all the accounts errors.

Enumerator
Database | Generic database error
Deleted | The account object refers to an account which has been deleted
DatabaseLocked | The database is locked
AccountNotFound | The account couldn't be found

Definition at line 49 of file error.h.

## Constructor & Destructor Documentation

## ◆ Error() [1/3]

Error | ( |  | ) |
| inline

Basic constructor.

Definition at line 62 of file error.h.

## ◆ Error() [2/3]

Error | ( | const Error & | src | ) |
| inline

Copy constructor.

Parameters

  src | Error object to be copied.

Definition at line 68 of file error.h.

## ◆ Error() [3/3]

Error | ( | ErrorType | type,
|  | const QString & | message = `QString()`
| ) |  |
| inline

Constructor.

Parameters

  type | The error's type.
  message | The error's message.

Definition at line 76 of file error.h.

## ◆ ~Error()

virtual ~Error | ( |  | ) |
| inlinevirtual

Destructor.

Definition at line 90 of file error.h.

## Member Function Documentation

## ◆ message()

QString message | ( |  | ) | const
| inline

Returns
  The error's message.

Definition at line 100 of file error.h.

Referenced by Error::operator=().

## ◆ operator=()

Error & operator= | ( | const Error & | src | ) |
| inline

Assignment operator.

Parameters

  src | The error object to be assigned to this instance.

Definition at line 84 of file error.h.

References Error::message(), and Error::type().

## ◆ type()

ErrorType type | ( |  | ) | const
| inline

Returns
  The error's type.

Definition at line 95 of file error.h.

Referenced by Error::operator=().

The documentation for this class was generated from the following file:

- Accounts/error.h