Beamlib 3.3.2
This is the Beam C++ class library.
|
Error return class. This class is used to return the error status from a function. It encapsulates an integer error number and a string. More...
#include <BError.h>
Public Member Functions | |
BError (int errNo=ErrorOk, BString errStr="") | |
Create object. More... | |
BError (BString errStr) | |
Create with error set and error string. More... | |
BError | copy () |
Return an independant copy. More... | |
BError & | set (int errNo, BString errStr="") |
Set error number and message. More... | |
BError & | clear () |
Clear the error. More... | |
BError & | setError (BString errStr="") |
Set error type ERROR with optional message. More... | |
BString | getString () const |
Get error message. More... | |
int | getNumber () const |
Get The error number. More... | |
int | num () const |
Get The error number. More... | |
const char * | str () const |
Return a char* string. More... | |
int | getErrorNo () const |
Get The error number. More... | |
operator int () const | |
Return error number. More... | |
Error return class. This class is used to return the error status from a function. It encapsulates an integer error number and a string.
An error number of ErrorOk (0) indicates no error, a value of ErrorMisc (1) indicates some error and a value of ErrorWarning (2) indiactes a warning. Specific error numbers are defeined in BErrorNum. System low level errors (errno) are defined by negativer values. Specific application errors are those above the value 64.
BError::BError | ( | BString | errStr | ) |
Create with error set and error string.
BError BError::copy | ( | ) |
Return an independant copy.
BError & BError::clear | ( | ) |
Clear the error.
BString BError::getString | ( | ) | const |
Get error message.
int BError::getNumber | ( | ) | const |
Get The error number.
int BError::num | ( | ) | const |
Get The error number.
const char * BError::str | ( | ) | const |
Return a char* string.
int BError::getErrorNo | ( | ) | const |
Get The error number.
|
inline |
Return error number.