EpcTools
An event based multi-threaded C++ development framework.
|
The base class for exceptions derived from std::exception. More...
#include <eerror.h>
Public Types | |
enum | Severity { Info, Warning, Error } |
Error severity levels. More... | |
Public Member Functions | |
EError () | |
Default constructor. More... | |
EError (Severity eSeverity, cpStr pszText=NULL) | |
Additonal constructor. More... | |
EError (Severity eSeverity, Dword err, cpStr pszText=NULL) | |
Additonal constructor. More... | |
EError (Severity eSeverity, const std::string &txt) | |
Additonal constructor. More... | |
EError (Severity eSeverity, Dword err, const std::string &txt) | |
Additonal constructor. More... | |
EError (const EError &val) | |
Copy constructor. More... | |
EError & | operator= (const EError &val) |
Assignment operator. More... | |
operator cpStr () | |
The const char* extractor. More... | |
EError & | copy (const EError &val) |
Copies the contents of the specified object to this object. More... | |
virtual const cpStr | Name () const |
Returns the name of this object. More... | |
Void | clear () |
Clears the current contents of this error object. More... | |
cpStr | getText () |
Returns the text associated with this error. More... | |
Void | setText (cpStr pszText) |
Sets the text associated with this error. More... | |
Void | setTextf (cpStr pszFormat,...) |
Sets the text associated with this error. More... | |
Void | appendText (cpStr pszText) |
appends the specified text to the current text of this error. More... | |
Void | appendTextf (cpStr pszText,...) |
appends the specified text to the current error text using a printf style format string and parameters. More... | |
Void | setSeverity (Severity eSeverity) |
Sets the severity level of this error object. More... | |
Void | setSevere () |
Sets the severity level of this error object to "Error". More... | |
Void | setWarning () |
Sets the severity level of this error object to "Warning". More... | |
Void | setInfo () |
Sets the severity level of this error object to "Info". More... | |
Bool | isSevere () |
Returns True if the severity is "Error". More... | |
Bool | isWarning () |
Returns True if the severity is "Warning". More... | |
Bool | isInfo () |
Returns True if the severity is "Info". More... | |
Bool | isError () |
Returns True if the severity is "Error". More... | |
Bool | isErrorOrWarning () |
Returns True if the severity is "Error" or "Warning". More... | |
Severity | getSeverity () |
Returns the current severity setting of this error object. More... | |
cpStr | getSeverityText () |
Returns the text based on the current error object's severity. More... | |
Dword | getLastOsError () |
Returns the current value of m_dwError. More... | |
Void | setLastOsError (Dword dwError=-1) |
Sets the value of m_dwError. More... | |
Void | appendLastOsError (Dword dwError=-1) |
Sets the value of m_dwError and appends the text description of the error to the current error text. More... | |
virtual const char * | what () const throw () |
The overloaded definition of the std::exception::what() method. More... | |
Static Public Member Functions | |
static cpStr | getSeverityText (Severity eSeverity) |
Returns the text asociated with the specified severity code. More... | |
static cpStr | getError (Int nError, EErrorMapEntry *pErrors) |
Returns a description for the specified application error code. More... | |
Public Attributes | |
Dword | m_dwError |
The unsigned long error code (if appropriate) More... | |
Severity | m_eSeverity |
Represents the severity of the error. More... | |
The base class for exceptions derived from std::exception.
enum EError::Severity |
|
inline |
Default constructor.
|
inline |
Additonal constructor.
eSeverity | the severity level for this error. |
pszText | this optional parameter is the text associated with this error. |
|
inline |
Additonal constructor.
eSeverity | the severity level for this error. |
err | numeric error code. |
pszText | this optional parameter is the text associated with this error. |
|
inline |
Additonal constructor.
eSeverity | the severity level for this error. |
txt | this optional parameter is the text associated with this error. |
|
inline |
Additonal constructor.
eSeverity | the severity level for this error. |
err | numeric error code. |
txt | this optional parameter is the text associated with this error. |
|
inline |
Copy constructor.
Void EError::appendLastOsError | ( | Dword | dwError = -1 | ) |
Sets the value of m_dwError and appends the text description of the error to the current error text.
|
inline |
appends the specified text to the current text of this error.
pszText | The text to append. |
Void EError::appendTextf | ( | cpStr | pszText, |
... | |||
) |
appends the specified text to the current error text using a printf style format string and parameters.
pszText | A printf style format string. |
... | Optinal parameters to be used as arguments to the format string. |
|
inline |
Clears the current contents of this error object.
Copies the contents of the specified object to this object.
val | The source object to copy. |
|
static |
Returns a description for the specified application error code.
nError | The error code to retrieve the description for. |
pErrors | The associated error map that contains the error definitions. |
|
inline |
Returns the current value of m_dwError.
|
inline |
Returns the current severity setting of this error object.
|
inline |
Returns the text based on the current error object's severity.
|
inlinestatic |
Returns the text asociated with the specified severity code.
eSeverity | The severity code to retrieve the associated description. |
|
inline |
Returns the text associated with this error.
|
inline |
Returns True if the severity is "Error".
|
inline |
Returns True if the severity is "Error" or "Warning".
|
inline |
Returns True if the severity is "Info".
|
inline |
Returns True if the severity is "Error".
|
inline |
Returns True if the severity is "Warning".
|
inlinevirtual |
Returns the name of this object.
This virtual method returns the name of the class. This method should be overridden in any derived class and set appropriately. The DECLARE_ERROR* macros handle this automatically.
|
inline |
The const char* extractor.
Assignment operator.
val | The source object to copy. |
|
inline |
Sets the severity level of this error object to "Info".
Void EError::setLastOsError | ( | Dword | dwError = -1 | ) |
Sets the value of m_dwError.
dwError | The new error value. |
|
inline |
Sets the severity level of this error object to "Error".
|
inline |
Sets the severity level of this error object.
eSeverity | The new severity level. |
|
inline |
Sets the text associated with this error.
pszText | the text for this error |
Void EError::setTextf | ( | cpStr | pszFormat, |
... | |||
) |
Sets the text associated with this error.
pszFormat | A printf style format string. |
... | Optional parameters to be used as arguments to the format string. |
|
inline |
Sets the severity level of this error object to "Warning".
|
inlinevirtual |
The overloaded definition of the std::exception::what() method.
Dword EError::m_dwError |
The unsigned long error code (if appropriate)
Severity EError::m_eSeverity |
Represents the severity of the error.