#include <acserrLegacy.h>
Public Member Functions | |
ACSError () | |
ACSError (const char *file, int line) | |
ACSError (const char *file, int line, const char *routine) | |
ACSError (const ACSErr::ErrorTrace &errortrace) | |
ACSError (ACSErr::ErrorTrace &errortrace) | |
ACSError (const char *file, int line, ACSErr::ErrorTrace *errortrace, bool release=1) | |
ACSError (ACSErr::ErrorTrace *errortrace, bool release=1) | |
ACSError (const char *file, int line, ACSErr::ACSErrType et, ACSErr::ErrorCode ec, const char *routine, ACSErr::Severity severity=DEFAULT_SEVERITY) | |
ACSError (const char *file, int line, ACSError &err, ACSErr::ACSErrType et, ACSErr::ErrorCode ec, const char *routine, ACSErr::Severity severity=DEFAULT_SEVERITY) | |
ACSError (const char *file, int line, ACSError *err, ACSErr::ACSErrType et, ACSErr::ErrorCode ec, const char *routine, ACSErr::Severity severity=DEFAULT_SEVERITY, bool release=1) | |
ACSError (ACSErr::ACSException &exception) | |
ACSError (const char *file, int line, ACSErr::ACSException &pex, ACSErr::ACSErrType et, ACSErr::ErrorCode ec, const char *routine, ACSErr::Severity severity=DEFAULT_SEVERITY) | |
ACSError (const char *file, int line, ACSErr::ErrorTrace &pc, ACSErr::ACSErrType et, ACSErr::ErrorCode ec, const char *routine, ACSErr::Severity severity=DEFAULT_SEVERITY) | |
~ACSError () | |
ACSErr::ErrorTrace & | getErrorTrace () |
ACSErr::ErrorTrace * | returnErrorTrace (bool deletion=true) |
ACSErr::ErrorTrace * | getNext () |
ACSErr::ErrorTrace * | top () |
void | log () |
bool | isOK () |
void | addData (const char *name, const char *value) |
template<class T > | |
void | addData (const char *name, T value) |
char * | getDescription () |
char * | getFileName () |
CORBA::ULong | getLineNumber () |
char * | getRoutine () |
char * | getHostName () |
char * | getProcess () |
char * | getThread () |
CORBA::ULongLong | getTimeStamp () |
ACSErr::ErrorCode | getErrorCode () |
ACSErr::ACSErrType | getErrorType () |
ACSErr::Severity | getSeverity () |
unsigned int | getDepth () |
void | setTimeStamp (CORBA::ULongLong time) |
void | setFileName (const char *fn) |
void | setLineNumber (CORBA::ULong ln) |
void | setError (ACSErr::ACSErrType ty, ACSErr::ErrorCode ec) |
void | setSeverity (ACSErr::Severity severity) |
Static Public Member Functions | |
static char * | getDescription (ACSErr::ACSErrType et, ACSErr::ErrorCode ec) |
static void | hostName (const char *hn) |
static void | processName (const char *pn) |
static void | setProcessName (const char *pn) |
static ACSErr::ErrorTrace | createErrorTrace (const char *file, int line, ACSError &er) |
static ACSErr::ErrorTrace | createErrorTrace (const char *file, int line, ACSErr::ACSException &pex, ACSErr::ACSErrType et, ACSErr::ErrorCode ec, const char *routine, ACSErr::Severity severity=DEFAULT_SEVERITY) |
static ACSErr::ErrorTrace | createErrorTrace (const char *file, int line, ACSErr::ACSErrType et, ACSErr::ErrorCode ec, const char *routine, ACSErr::Severity severity=DEFAULT_SEVERITY) |
static bool | init (int argc, char *argv[]) |
static bool | init (CORBA::ORB_ptr _orb) |
static bool | init () |
static bool | isInit () |
static void | done () |
Protected Member Functions | |
void | log (ACSErr::ErrorTrace *c, int level) |
void | fill (ACSErr::ACSErrType et, ACSErr::ErrorCode ec, ACSErr::Severity severity, const char *file, int line, const char *routine) |
ACS::Time | getTime () |
Static Protected Member Functions | |
static bool | initLog (CORBA::ORB_ptr _orb) |
Protected Attributes | |
ACSErr::ErrorTrace | errorTrace |
ACSErr::ErrorTrace * | current |
unsigned int | depth |
Static Protected Attributes | |
static bool | initialized |
static CORBA::ORB_var | orb |
static std::unexpected_handler | m_oldUnexpected |
static std::terminate_handler | m_oldTerminate |
static const ACSErr::ACSErrType | ACSErrTypeOK |
static const ACSErr::ErrorCode | ACSErrOK |
Helper class for handling error structure (=ErrorTrace) locally in C++.
ACSError::ACSError | ( | ) |
Constructor for creating "no error" object which does not contain runtime and source information. Instead can be used macro ACS_ERROR(). It just set error code and type to 0 (e.g. ACSErrOK, ACSErrTypeOK).
ACSError::ACSError | ( | const char * | file, | |
int | line | |||
) |
Constructor for creating "no error" object which does not contain runtime and source information. Instead can be used macro ACS_ERROR(). It just set error code and type to 0 (e.g. ACSErrOK, ACSErrTypeOK). This constructor is functional equal to constructor ACSError () and it is there just that macro ACS_ERROR () can be used.
file | it is ignored | |
line | it is ignored |
ACSError::ACSError | ( | const char * | file, | |
int | line, | |||
const char * | routine | |||
) |
Constructor for creating "no error" object. Instead can be used macro ACS_ERROR(ro).
file | name of the file where the error occured (should be used __FILE__ macro) | |
line | line number where the error occured (should be used __LINE__ macro) | |
routine | name of the routine where the error occured |
ACSError::ACSError | ( | const ACSErr::ErrorTrace & | errortrace | ) |
Constructor for creating error object from errortrace.
errortrace | structure contains error information |
ACSError::ACSError | ( | ACSErr::ErrorTrace & | errortrace | ) |
Constructor for creating error object from errortrace.
errortrace | structure contains error information |
ACSError::ACSError | ( | const char * | file, | |
int | line, | |||
ACSErr::ErrorTrace * | errortrace, | |||
bool | release = 1 | |||
) |
Constructor for creating error object from pointer errortrace. It makes copy of errortrace.
file | it is ignored | |
line | it is ignored | |
pointer | to errortrace structure contains error information | |
flag | which indicates if errortrace shall be released - ACSError will take care of memory managment of the errortrace. This constructor is functional equal to constructor ACSError (ACSErr::ErrorTrace* errortrace, bool release=1) and it is there just that macro ACS_ERROR () can be used. |
ACSError::ACSError | ( | ACSErr::ErrorTrace * | errortrace, | |
bool | release = 1 | |||
) |
Constructor for creating error object from pointer errortrace. It makes copy of errortrace.
pointer | to errortrace structure contains error information | |
flag | which indicates if errortrace shall be released - ACSError will take care of memory managment of the errortrace. |
ACSError::ACSError | ( | const char * | file, | |
int | line, | |||
ACSErr::ACSErrType | et, | |||
ACSErr::ErrorCode | ec, | |||
const char * | routine, | |||
ACSErr::Severity | severity = DEFAULT_SEVERITY | |||
) |
Constructor for creating error object. Macro ACS_ERROR(et, ec, ro) should be used instead.
file | name of the file where the error occured (should be used __FILE__ macro) | |
line | line number where error the occured (should be used __LINE__ macro) | |
et | error type (group) | |
ec | error code | |
routine | name of the routine where the error occured | |
severity | severity of error (default medium = DEFAULT_SEVERITY) |
ACSError::ACSError | ( | const char * | file, | |
int | line, | |||
ACSError & | err, | |||
ACSErr::ACSErrType | et, | |||
ACSErr::ErrorCode | ec, | |||
const char * | routine, | |||
ACSErr::Severity | severity = DEFAULT_SEVERITY | |||
) |
Constructor for creating error object which contains also trace to previous error(s). Macro ACS_ERROR(perr, et, ec, ro) should be used instead.
file | name of the file where the error occured (should be used __FILE__ macro) | |
line | line number where error the occured (should be used __LINE__ macro) | |
err | previos error | |
et | error type (group) | |
ec | error code | |
routine | name of the routine where the error occured | |
severity | severity of error (default medium = DEFAULT_SEVERITY) | |
release |
ACSError::ACSError | ( | const char * | file, | |
int | line, | |||
ACSError * | err, | |||
ACSErr::ACSErrType | et, | |||
ACSErr::ErrorCode | ec, | |||
const char * | routine, | |||
ACSErr::Severity | severity = DEFAULT_SEVERITY , |
|||
bool | release = 1 | |||
) |
Constructor for creating error object which contains also trace to previous error(s). Macro ACS_ERROR(perr, et, ec, ro) should be used instead.
file | name of the file where the error occured (should be used __FILE__ macro) | |
line | line number where error the occured (should be used __LINE__ macro) | |
err | previos error | |
et | error type (group) | |
ec | error code | |
routine | name of the routine where the error occured | |
severity | severity of error (default medium = DEFAULT_SEVERITY) | |
release |
ACSError::ACSError | ( | ACSErr::ACSException & | exception | ) |
Constructor for creating error object from IDL exception (=ACSException).
reference | to the exception object contains error information i.e. ErrorTrace |
ACSError::ACSError | ( | const char * | file, | |
int | line, | |||
ACSErr::ACSException & | pex, | |||
ACSErr::ACSErrType | et, | |||
ACSErr::ErrorCode | ec, | |||
const char * | routine, | |||
ACSErr::Severity | severity = DEFAULT_SEVERITY | |||
) |
Constructor for creating error object which contains also trace to previous error(s) from ACSException object. Macro ACS_ERROR(pe, ed, en, ro) should be used instead.
file | name of the file where the error occured (should be used __FILE__ macro) | |
line | line number where error the occured (should be used __LINE__ macro) | |
pex | reference to previos exception | |
et | error type | |
ec | error code | |
routine | name of the routine where the error occured | |
severity | severity of error (default medium = DEFAULT_SEVERITY) |
ACSError::ACSError | ( | const char * | file, | |
int | line, | |||
ACSErr::ErrorTrace & | pc, | |||
ACSErr::ACSErrType | et, | |||
ACSErr::ErrorCode | ec, | |||
const char * | routine, | |||
ACSErr::Severity | severity = DEFAULT_SEVERITY | |||
) |
Constructor for creating error object which contains also trace to previous error(s) from errortrace structure (ErrorTrace). Macro ACS_ERROR(pe, ed, en, ro) should be used instead.
file | name of the file where the error occured (should be used __FILE__ macro) | |
line | line number where error the occured (should be used __LINE__ macro) | |
pc | reference to previos error contained in structure ErrorTrace | |
et | error type (group) | |
ec | error code | |
routine | name of the routine where the error occured | |
severity | severity of error (default medium = DEFAULT_SEVERITY) |
ACSError::~ACSError | ( | ) |
Destructor
void ACSError::addData | ( | const char * | name, | |
const char * | value | |||
) |
Adds data to the current error
name | data name | |
value | string data value |
Referenced by addData().
void ACSError::addData | ( | const char * | name, | |
T | value | |||
) | [inline] |
static ACSErr::ErrorTrace ACSError::createErrorTrace | ( | const char * | file, | |
int | line, | |||
ACSErr::ACSErrType | et, | |||
ACSErr::ErrorCode | ec, | |||
const char * | routine, | |||
ACSErr::Severity | severity = DEFAULT_SEVERITY | |||
) | [static] |
static ACSErr::ErrorTrace ACSError::createErrorTrace | ( | const char * | file, | |
int | line, | |||
ACSError & | er | |||
) | [inline, static] |
References getErrorTrace().
static ACSErr::ErrorTrace ACSError::createErrorTrace | ( | const char * | file, | |
int | line, | |||
ACSErr::ACSException & | pex, | |||
ACSErr::ACSErrType | et, | |||
ACSErr::ErrorCode | ec, | |||
const char * | routine, | |||
ACSErr::Severity | severity = DEFAULT_SEVERITY | |||
) | [static] |
static void ACSError::done | ( | ) | [static] |
void ACSError::fill | ( | ACSErr::ACSErrType | et, | |
ACSErr::ErrorCode | ec, | |||
ACSErr::Severity | severity, | |||
const char * | file, | |||
int | line, | |||
const char * | routine | |||
) | [protected] |
Fills errortrace structure
et | error type (group) | |
ec | error code | |
severity | severity of error | |
file | name of the file where the error occured | |
line | line number where the error occured | |
routine | name of the routine where the error occured |
unsigned int ACSError::getDepth | ( | ) | [inline] |
char* ACSError::getDescription | ( | ) |
Returns copy of description of current error. User have to take care of releasing it!
static char* ACSError::getDescription | ( | ACSErr::ACSErrType | et, | |
ACSErr::ErrorCode | ec | |||
) | [static] |
Returns description of the error
et | error type (group) | |
ec | error code |
ACSErr::ErrorCode ACSError::getErrorCode | ( | ) | [inline] |
ACSErr::ErrorTrace& ACSError::getErrorTrace | ( | ) | [inline] |
Gets reference to errortrace structure. User must take care for makeing copy of structure or should use method returnErrorTrace
References current.
Referenced by createErrorTrace().
ACSErr::ACSErrType ACSError::getErrorType | ( | ) | [inline] |
char* ACSError::getFileName | ( | ) | [inline] |
Returns file name information of the error
References current.
char* ACSError::getHostName | ( | ) | [inline] |
Returns host name information of the error
References current.
CORBA::ULong ACSError::getLineNumber | ( | ) | [inline] |
ACSErr::ErrorTrace* ACSError::getNext | ( | ) |
Moves to the next errortrace element and return its pointer (not copy). If there is no next errortrace element NULL will be returned
char* ACSError::getProcess | ( | ) | [inline] |
Retruns process information of the error. Its name or process ID.
References current.
char* ACSError::getRoutine | ( | ) | [inline] |
Returns routine information of tehe error
References current.
ACSErr::Severity ACSError::getSeverity | ( | ) | [inline] |
Returns error severity
References current.
char* ACSError::getThread | ( | ) | [inline] |
Returns thread information of the error. The name of thread or its ID.
References current.
ACS::Time ACSError::getTime | ( | ) | [protected] |
Returns time in 100th of nano seconds needed for error time stamp
CORBA::ULongLong ACSError::getTimeStamp | ( | ) | [inline] |
Returns time stamp of the error in 100th of nanoseconds.
References current.
static void ACSError::hostName | ( | const char * | hn | ) | [static] |
Sets host name
hn | host name |
static bool ACSError::init | ( | int | argc, | |
char * | argv[] | |||
) | [static] |
static bool ACSError::init | ( | ) | [static] |
Referenced by ACSDaemonServiceImpl< T >::startup().
static bool ACSError::init | ( | CORBA::ORB_ptr | _orb | ) | [static] |
static bool ACSError::initLog | ( | CORBA::ORB_ptr | _orb | ) | [static, protected] |
static bool ACSError::isInit | ( | ) | [inline, static] |
References initialized.
bool ACSError::isOK | ( | ) | [inline] |
Returns true if errortrace does not represent error otherwise false.
References ACSErrOK, ACSErrTypeOK, and current.
void ACSError::log | ( | ) |
Logs errortrace information into logging system
void ACSError::log | ( | ACSErr::ErrorTrace * | c, | |
int | level | |||
) | [protected] |
Logs single error
c | errortrace contains error to log | |
level | of error in erro stack |
static void ACSError::processName | ( | const char * | pn | ) | [static] |
process | name |
ACSErr::ErrorTrace* ACSError::returnErrorTrace | ( | bool | deletion = true |
) |
void ACSError::setError | ( | ACSErr::ACSErrType | ty, | |
ACSErr::ErrorCode | ec | |||
) | [inline] |
Sets current error code
ty | error type (should be of type ACSErr::ACSErrType defined in acserrType.idl) | |
ec | erro code |
References current.
void ACSError::setFileName | ( | const char * | fn | ) | [inline] |
void ACSError::setLineNumber | ( | CORBA::ULong | ln | ) | [inline] |
static void ACSError::setProcessName | ( | const char * | pn | ) | [static] |
Sets process name
process | name |
void ACSError::setSeverity | ( | ACSErr::Severity | severity | ) | [inline] |
void ACSError::setTimeStamp | ( | CORBA::ULongLong | time | ) | [inline] |
Sets time stamp of the error in 100th of nanoseconds. time CORBA::ULongLong time stamp
References current.
ACSErr::ErrorTrace* ACSError::top | ( | ) | [inline] |
Moves to the first (top) errortrace element and return its pointer (not copy).
References current, and errorTrace.
const ACSErr::ErrorCode ACSError::ACSErrOK [static, protected] |
Referenced by isOK().
const ACSErr::ACSErrType ACSError::ACSErrTypeOK [static, protected] |
Referenced by isOK().
ACSErr::ErrorTrace * ACSError::current [protected] |
unsigned int ACSError::depth [protected] |
Referenced by getDepth().
ACSErr::ErrorTrace ACSError::errorTrace [protected] |
Referenced by top().
bool ACSError::initialized [static, protected] |
Referenced by isInit().
std::terminate_handler ACSError::m_oldTerminate [static, protected] |
std::unexpected_handler ACSError::m_oldUnexpected [static, protected] |
CORBA::ORB_var ACSError::orb [static, protected] |