Public Types | |
enum | Module { NOT_SET, OS, BASE, BASEIO, OUTPUT, NETWORK, XML, SECURITY, DBAL, TOOLS, USERAPP, USERLIB } |
Available modules. More... | |
Public Member Functions | |
NException (void) | |
Constructs a NException object. | |
NException (const NString &desc, Module module, Flag flag=EX_NONE) | |
Constructs a NException object. | |
virtual | ~NException (void) |
Destroys a NException object. | |
void | setDescription (const NString &desc) |
Sets the description of a NException object. | |
NString | getDescription (void) const |
Gets the description of a NException object. | |
void | setModule (Module module) |
Sets the module in which the exception was thrown. | |
NException::Module | getModule (void) const |
Returns the module in which the exception was thrown. | |
NException & | operator= (const NException &other) |
Sets the description of a NException object. | |
void | setFlag (Flag flag) |
Sets the error flag associated with the object. | |
Flag | getFlag (void) const |
Gets the error flag associated with the object. | |
Static Public Attributes | |
static const Flag | EX_NONE = 0 |
Non-error flag for the exception:. | |
static const Flag | EX_OUT_OF_BOUNDS = 1 |
Out of bounds erro flag for the exception:. | |
Protected Member Functions | |
void | setErrorId (nint16 error_id) |
Sets the error identification for a given exception. |
ex_ndatastream.cpp, ex_ndir.cpp, ex_nfileinfo.cpp, ex_ngetopt.cpp, ex_nregex.cpp, ex_nxmlreader.cpp, ex_nxmlwrite.cpp, hashapp.cpp, and nsqlapp.cpp.
Definition at line 39 of file nexception.h.
enum Module |
Available modules.
Definition at line 44 of file nexception.h.
NException | ( | const NString & | desc, | |
Module | module, | |||
Flag | flag = EX_NONE | |||
) |
Constructs a NException object.
desc | Exception description | |
module | The module in which the exception occurred | |
flag | An unique id that identifies the error that occurred |
Definition at line 34 of file nexception.cpp.
void setDescription | ( | const NString & | desc | ) |
Sets the description of a NException object.
desc | Exception description |
Definition at line 46 of file nexception.cpp.
Referenced by NXmlError::getLastError(), and operator=().
NString getDescription | ( | void | ) | const |
Gets the description of a NException object.
Definition at line 51 of file nexception.cpp.
Referenced by operator=().
void setModule | ( | NException::Module | module | ) |
Sets the module in which the exception was thrown.
module | The module in which the exception was thrown as defined by the enum Module. |
Definition at line 56 of file nexception.cpp.
Referenced by NXmlError::getLastError(), and operator=().
NException::Module getModule | ( | void | ) | const |
Returns the module in which the exception was thrown.
Definition at line 61 of file nexception.cpp.
Referenced by operator=().
NException & operator= | ( | const NException & | other | ) |
Sets the description of a NException object.
other | NException object to be copied |
Definition at line 76 of file nexception.cpp.
References getDescription(), getModule(), setDescription(), and setModule().
void setFlag | ( | Flag | flag | ) |
Sets the error flag associated with the object.
flag | The value of the flag associated with the object |
Definition at line 66 of file nexception.cpp.
Referenced by NXmlError::getLastError().
Flag getFlag | ( | void | ) | const |
Gets the error flag associated with the object.
Definition at line 71 of file nexception.cpp.
void setErrorId | ( | nint16 | error_id | ) | [protected] |
Sets the error identification for a given exception.
error_id | The identification for the error. |