The class provides most of the functionality needed to create an error and to convert it into a meaningful message.
Definition at line 55 of file osberror.h.
typedef std::vector<std::string> OSB_LIB::BaseError::Args |
typedef long OSB_LIB::BaseError::ErrorNo |
OSB_LIB::BaseError::BaseError | ( | ErrorNo | e | ) | [inline, explicit] |
Constructor with error number.
e | Error number, use noError_ to indicate success, i.e., no error. |
Definition at line 362 of file osberror.h.
OSB_LIB::BaseError::~BaseError | ( | ) | [inline, virtual] |
OSB_LIB::BaseError::BaseError | ( | const BaseError & | rhs | ) | [inline, protected] |
const Args& OSB_LIB::BaseError::args | ( | ) | const |
Access to the individual error arguments.
std::string OSB_LIB::BaseError::code | ( | ) | const |
Get to error code and number.
virtual const std::string& OSB_LIB::BaseError::fileName | ( | ) | const [pure virtual] |
bool OSB_LIB::BaseError::isError | ( | ) | const [inline] |
Really an error?
Definition at line 401 of file osberror.h.
const std::string OSB_LIB::BaseError::msg | ( | ) | const |
Get the error message.
ErrorNo OSB_LIB::BaseError::no | ( | ) | const |
Get the error number.
bool OSB_LIB::BaseError::noError | ( | ) | const [inline] |
Not an error?
Definition at line 396 of file osberror.h.
BaseError & OSB_LIB::BaseError::operator<< | ( | const T & | t | ) | [inline] |
Create and add argument from an arbitrary type.
An output operator for t to an std::ostringstring must exist.
Reimplemented in OSB_LIB::DefException.
Definition at line 419 of file osberror.h.
References args_.
BaseError & OSB_LIB::BaseError::operator<< | ( | const std::string & | s | ) | [inline] |
Create and add argument from std::string.
Definition at line 412 of file osberror.h.
References args_.
BaseError & OSB_LIB::BaseError::operator<< | ( | const char * | s | ) | [inline] |
Assignment for derived classes only.
Definition at line 382 of file osberror.h.
References args_, and errorNo_.
Referenced by OSB_LIB::OsbBaseError::operator=().
virtual const char* const OSB_LIB::BaseError::prefix | ( | ) | const [pure virtual] |
The error prefix.
This is a 3-letter code that identifies the error type and the message file that contains the description.
Implemented in OSB_LIB::OsbError, and OSB_LIB::OsbException.
const std::string OSB_LIB::BaseError::what | ( | ) | const |
Args OSB_LIB::BaseError::args_ [protected] |
Error argument.
Definition at line 167 of file osberror.h.
Referenced by operator<<(), and operator=().
ErrorNo OSB_LIB::BaseError::errorNo_ [private] |
Unique error number.
Definition at line 164 of file osberror.h.
Referenced by isError(), noError(), and operator=().
const ErrorNo OSB_LIB::BaseError::noError_ = 0 [static] |