Electronics and Software
Engineering Innovation
Beam-lib  2.15.1

#include <BError.h>

Inheritance diagram for BError:

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...
BErrorset (int errNo, BString errStr="")
 Set error number and message. More...
BErrorclear ()
 Clear the error. More...
BErrorsetError (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...

Private Attributes

int oerrNo
BString oerrStr

Detailed Description

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.

Constructor & Destructor Documentation

◆ BError() [1/2]

BError::BError ( int  errNo = ErrorOk,
BString  errStr = "" 

Create object.

◆ BError() [2/2]

BError::BError ( BString  errStr)

Create with error set and error string.

Member Function Documentation

◆ clear()

BError & BError::clear ( )

Clear the error.

◆ copy()

BError BError::copy ( )

Return an independant copy.

◆ getErrorNo()

int BError::getErrorNo ( ) const

Get The error number.

◆ getNumber()

int BError::getNumber ( ) const

Get The error number.

◆ getString()

BString BError::getString ( ) const

Get error message.

◆ num()

int BError::num ( ) const

Get The error number.

◆ operator int()

BError::operator int ( ) const

Return error number.

◆ set()

BError & BError::set ( int  errNo,
BString  errStr = "" 

Set error number and message.

◆ setError()

BError & BError::setError ( BString  errStr = "")

Set error type ERROR with optional message.

◆ str()

const char * BError::str ( ) const

Return a char* string.

Member Data Documentation

◆ oerrNo

int BError::oerrNo

◆ oerrStr

BString BError::oerrStr

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