Accounts.Error

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

#include <Accounts/Error>

Public Types

enum  ErrorType {
  NoError = 0, Unknown, Database, Deleted,
  DatabaseLocked, AccountNotFound
}
 More...
 

Public Member Functions

 Error ()
 Basic constructor.
 
 Error &src)
 Copy constructor. More...
 
 message=QString())
 Constructor. More...
 
Error &src)
 Assignment operator. More...
 
virtual ~Error ()
 Destructor.
 
type () const
 
QString message () const
 

Detailed Description

Base object definition for accounts error handling.

Definition at line 42 of file error.h.

Member Enumeration Documentation

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 48 of file error.h.

Constructor & Destructor Documentation

Error ( const Error src)
inline

Copy constructor.

Parameters
srcError object to be copied.

Definition at line 67 of file error.h.

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

Constructor.

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

Definition at line 75 of file error.h.

Member Function Documentation

QString message ( ) const
inline
Returns
The error's message.

Definition at line 99 of file error.h.

Referenced by Error::operator=().

Error& operator= ( const Error src)
inline

Assignment operator.

Parameters
srcThe error object to be assigned to this instance.

Definition at line 83 of file error.h.

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

ErrorType type ( ) const
inline
Returns
The error's type.

Definition at line 94 of file error.h.

Referenced by Error::operator=().