iberbox  2.1.2
iberbox::Error Class Reference

The error class. More...

Collaboration diagram for iberbox::Error:

Public Types

enum  ErrorType {
  E_SUCCESS = 0, E_NOTFOUND = 1, E_FORBIDDEN = 2, E_SESSION = 3,
  E_CRYPTO = 4, E_PARAMETERS = 5, E_EXPIRED = 6, E_DUPLICATE = 7,
  E_BUSY = 8, E_UNKNOWN = 9, E_FAST = 10, E_TEMPORARY = 11,
  E_MANY = 12, E_QUOTA = 13, E_TAKEDOWN = 14, E_RANGE = 15,
  E_CANCELLED = 16, E_LOOP = 17, E_IO = 18, E_INVOICING = 19,
  E_COUPON = 20, E_INCOMPLETE = 21, LAST
}
 The error type. More...
 

Public Member Functions

 Error (int type=E_SUCCESS)
 
const char * getName () const
 Gets the Name object. More...
 
const std::string getNameString () const
 Gets the Name String object. More...
 
int getType () const
 Gets the type of the error. More...
 
virtual ~Error ()
 

Static Public Member Functions

static const char * getTypeName (int type)
 Gets the event type name. More...
 
static const std::string getTypeNameString (unsigned type)
 Gets the event type name. More...
 

Detailed Description

The error class.

Member Enumeration Documentation

◆ ErrorType

The error type.

Enumerator
E_SUCCESS 
E_NOTFOUND 
E_FORBIDDEN 
E_SESSION 
E_CRYPTO 
E_PARAMETERS 
E_EXPIRED 
E_DUPLICATE 
E_BUSY 
E_UNKNOWN 
E_FAST 
E_TEMPORARY 
E_MANY 
E_QUOTA 
E_TAKEDOWN 
E_RANGE 
E_CANCELLED 
E_LOOP 
E_IO 
E_INVOICING 
E_COUPON 
E_INCOMPLETE 
LAST 

Constructor & Destructor Documentation

◆ Error()

iberbox::Error::Error ( int  type = E_SUCCESS)
inline

◆ ~Error()

virtual iberbox::Error::~Error ( )
inlinevirtual

Member Function Documentation

◆ getName()

const char* iberbox::Error::getName ( ) const
inline

Gets the Name object.

Returns
const char*

References getTypeName().

◆ getNameString()

const std::string iberbox::Error::getNameString ( ) const
inline

Gets the Name String object.

Returns
const std::string

References getTypeNameString().

◆ getType()

int iberbox::Error::getType ( ) const
inline

Gets the type of the error.

The valid values are described in Error::ErrorType.

Returns
The type of the error.

◆ getTypeName()

static const char* iberbox::Error::getTypeName ( int  type)
inlinestatic

Gets the event type name.

type valid values are described in EventType enum

Parameters
typeThe event type.
Returns
The event type name as a char array.

References LAST.

Referenced by getName(), and getTypeNameString().

◆ getTypeNameString()

static const std::string iberbox::Error::getTypeNameString ( unsigned  type)
inlinestatic

Gets the event type name.

type valid values are described in EventType enum

Parameters
typeThe event type.
Returns
The event type as a std::string.

References getTypeName().

Referenced by getNameString().


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