accounts-qt  1.16
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. More...
 
 Error (ErrorType type, const QString &message=QString())
 Constructor. More...
 
Erroroperator= (const Error &src)
 Assignment operator. More...
 
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/2]

Error ( const Error src)
inline

Copy constructor.

Parameters
srcError object to be copied.

Definition at line 68 of file error.h.

◆ Error() [2/2]

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

Constructor.

Parameters
typeThe error's type.
messageThe error's message.

Definition at line 76 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
srcThe 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: