Public Types | Public Member Functions

Accounts::Error Class Reference

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

#include <error.h>

List of all members.

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.
Erroroperator= (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 46 of file error.h.


Member Enumeration Documentation

Error codes for all the accounts errors.

Enumerator:
NoError 
Unknown 
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 52 of file error.h.


Constructor & Destructor Documentation

Accounts::Error::Error (  )  [inline]

Basic constructor.

Definition at line 65 of file error.h.

Accounts::Error::Error ( const Error src  )  [inline]

Copy constructor.

Parameters:
src Error object to be copied.

Definition at line 71 of file error.h.

Accounts::Error::Error ( ErrorType  type,
const QString &  message = QString() 
) [inline]

Constructor.

Parameters:
type The error's type.
message The error's message.

Definition at line 79 of file error.h.

virtual Accounts::Error::~Error (  )  [inline, virtual]

Destructor.

Definition at line 93 of file error.h.


Member Function Documentation

QString Accounts::Error::message (  )  const [inline]
Returns:
The error's message.

Definition at line 103 of file error.h.

Referenced by operator=().

Error& Accounts::Error::operator= ( const Error src  )  [inline]

Assignment operator.

Parameters:
src The error object to be assigned to this instance.

Definition at line 87 of file error.h.

References message(), and type().

ErrorType Accounts::Error::type (  )  const [inline]
Returns:
The error's type.

Definition at line 98 of file error.h.

Referenced by operator=().


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