ACSErr::ErrorTraceHelper − |
#include <acserr.h> Inherited by ACSErr::ACSbaseExImpl. |
Public Member Functions |
void log (ACE_Log_Priority priorty=LM_ERROR) |
std::string toString () |
void addData (const char *name, const char *value) |
void addData (const char *name, char *value) |
template<typename T > void addData (const char *name, T value) |
void setMemberValue (const char *name, const char *value) |
void setMemberValue (const char *name, ACE_CString &value) |
template<typename T > void setMemberValue (const char *name, T value) |
ACE_CString getData (const char *name) |
void getMemberValue (const char *name, char *&value) |
template<typename T > void getMemberValue (const char *name, T &value) |
template<typename T > T getMemberValue (const char *name) |
char * getDescription () |
char * getShortDescription () |
char * getFileName () |
CORBA::ULong getLineNumber () |
char * getRoutine () |
char * getHostName () |
char * getProcessName () |
char * getThread () |
char * getSourceObject () |
CORBA::ULongLong getTimeStamp () |
ACSErr::ErrorCode getErrorCode () |
ACSErr::ACSErrType getErrorType () |
ACSErr::Severity getSeverity () |
unsigned int getDepth () |
void setTimeStamp (CORBA::ULongLong time) |
void setSourceObject (const char *so) |
void setFileName (const char *fn) |
void setLineNumber (CORBA::ULong ln) |
void setError (ACSErr::ACSErrType ty, ACSErr::ErrorCode ec) |
void setSeverity (ACSErr::Severity severity) |
ACSErr::ErrorTrace * getNext () |
bool last () |
ACSErr::ErrorTrace * top () |
ACSErr::ErrorTrace & getErrorTrace () |
ErrorTraceHelper * getErrorTraceHelper () |
template<> char * getMemberValue (const char *name) |
template<> ACE_CString getMemberValue (const char *name) |
Static Public Member Functions |
static void setHostName (const char *hn) |
static void setProcessName (const char *pn) |
static ACS::Time getTime () |
Protected Member Functions |
ErrorTraceHelper (ACSErr::ErrorTrace &et) |
void setErrorTrace (ACSErr::ErrorTrace &et, int depth) |
ErrorTraceHelper () |
ErrorTraceHelper (ACSErr::ACSErrType et, ACSErr::ErrorCode ec, const char *file, int line, const char *routine, const char *sd, ACSErr::Severity severity, ACSErr::ErrorTrace &errortrace) |
ErrorTraceHelper (const ACSErr::ErrorTrace &pet, ACSErr::ACSErrType et, ACSErr::ErrorCode ec, const char *file, int line, const char *routine, const char *sd, ACSErr::Severity severity, ACSErr::ErrorTrace &errortrace) |
ErrorTraceHelper & operator= (ACSErr::ErrorTrace ð) |
void fill (ACSErr::ACSErrType et, ACSErr::ErrorCode ec, ACSErr::Severity severity, const char *file, int line, const char *routine, const char *sd) |
void log (ACSErr::ErrorTrace *c, int level, char *stackId, ACE_Log_Priority priorty=LM_ERROR) |
void toString (ACSErr::ErrorTrace *c, int level, std::ostringstream &oss) |
Protected Attributes |
ACSErr::ErrorTrace * m_errorTracePtr |
ACSErr::ErrorTrace * m_current |
unsigned int m_depth |
Static Protected Attributes |
static char m_hostName [64] |
static char m_processName [64] |
static const unsigned int m_maxDepth |
Friends |
class CompletionImpl |
class ::ACSLogImpl |
class ::ACSError |
Helper class for CORBA error trace (ACSErr::ErrorTrace) |
ACSErr::ErrorTraceHelper::ErrorTraceHelper (ACSErr::ErrorTrace & et) [protected] |
ACSErr::ErrorTraceHelper::ErrorTraceHelper () [inline, protected] |
ACSErr::ErrorTraceHelper::ErrorTraceHelper (ACSErr::ACSErrType et, ACSErr::ErrorCode ec, const char * file, int line, const char * routine, const char * sd, ACSErr::Severity severity, ACSErr::ErrorTrace & errortrace) [protected] |
ACSErr::ErrorTraceHelper::ErrorTraceHelper (const ACSErr::ErrorTrace & pet, ACSErr::ACSErrType et, ACSErr::ErrorCode ec, const char * file, int line, const char * routine, const char * sd, ACSErr::Severity severity, ACSErr::ErrorTrace & errortrace) [protected] |
void ACSErr::ErrorTraceHelper::addData (const char * name, const char * value) Adds data to the current error trace. If the name apperas more than one time it adds it more times. |
Parameters: |
name data name, which should be shorter than 255
characters otherwise is truncated. If name is NULL the
method return w/o setting anything. |
Referenced by ACSErr::CompletionImpl::addData(), and addData(). |
void ACSErr::ErrorTraceHelper::addData (const char * name, char * value) [inline] Variation of addData for non cons char* value, otherwise the template versioin is taken. It just pass work to addData(const char* name, const char* value). |
References addData(). |
template<typename T > void ACSErr::ErrorTraceHelper::addData (const char * name, T value) [inline] Templated version of addData adds data (pair of name-value) It works for all types that can be put to std::ostringstream. |
Parameters: |
name data name, which should be shorter than 255
characters otherwise is truncated. If name is NULL the
method return w/o setting anything. |
References addData(). |
void ACSErr::ErrorTraceHelper::fill (ACSErr::ACSErrType et, ACSErr::ErrorCode ec, ACSErr::Severity severity, const char * file, int line, const char * routine, const char * sd) [protected] |
ACE_CString ACSErr::ErrorTraceHelper::getData (const char * name) Gets data value for data name (first occurrence). If data for name is not found it returns an empty string. |
Parameters: |
name data name. If name is NULL an empty string is returned. |
Returns: |
value string data value |
Referenced by getMemberValue(). |
unsigned int ACSErr::ErrorTraceHelper::getDepth () [inline] Returns depth of error stack |
Returns: |
unsigned int depth |
References m_depth. |
char* ACSErr::ErrorTraceHelper::getDescription () Returns copy of short (!) description of current error. User have to take care of releasing it! |
Returns: |
pointer to the char (=string). TBD: should return description if it is possible to retreive it. To be changed or removed. short description should be retreived using getShortDescription |
ACSErr::ErrorCode ACSErr::ErrorTraceHelper::getErrorCode () [inline] Returns error code |
Returns: |
ACSErr::ErrorCode |
References m_current. |
ACSErr::ErrorTrace& ACSErr::ErrorTraceHelper::getErrorTrace () [inline] Gets reference to errortrace structure. User must take care for makeing copy of structure or should use method returnErrorTrace |
Returns: |
reference to the current errortrace structure |
Todo |
if current is NULL than exception should be thrown |
References m_current. |
ErrorTraceHelper* ACSErr::ErrorTraceHelper::getErrorTraceHelper () [inline] Return pointer to ErrorTraceHelper what is itself (=this). It is here just to make generated code simpler. |
Returns: |
pointer to itself |
ACSErr::ACSErrType ACSErr::ErrorTraceHelper::getErrorType () [inline] Returns error type |
Returns: |
ACSErr::ACSErrType |
References m_current. |
char* ACSErr::ErrorTraceHelper::getFileName () [inline] Returns file name information of the error |
Returns: |
pointer to char contains file name |
References m_current. |
char* ACSErr::ErrorTraceHelper::getHostName () [inline] Returns host name information of the error |
Returns: |
pointer to char contains host name |
References m_current. |
CORBA::ULong ACSErr::ErrorTraceHelper::getLineNumber () [inline] Returns line number information of the error |
Returns: |
CORBA::ULong line number |
References m_current. |
template<> char* ACSErr::ErrorTraceHelper::getMemberValue (const char * name) |
template<> ACE_CString ACSErr::ErrorTraceHelper::getMemberValue (const char * name) |
void ACSErr::ErrorTraceHelper::getMemberValue (const char * name, char *& value) [inline] Gets data value for data name (first occurrence). This method is mainly used by generated code. If data for name is not found it returns an empty string. |
Parameters: |
name data name |
References getData(). |
template<typename T > void ACSErr::ErrorTraceHelper::getMemberValue (const char * name, T & value) [inline] Template version of getMemberValue. Gets data value for data name (first occurrence). It works for all types that can be retreived from std::istringstream like: int, string and double. If data name is not found it returns empty string. |
Parameters: |
name data name |
References getData(). |
template<typename T > T ACSErr::ErrorTraceHelper::getMemberValue (const char * name) Another version of getMemberValue, which is more elegant since it returns value. This function is mainly used by generated code. It works for all types that can be retreived from std::istringstream like: int, string and double. |
Parameters: |
name data name |
Returns: |
data vlaue of right type |
References getData(). |
ACSErr::ErrorTrace* ACSErr::ErrorTraceHelper::getNext () Moves to the next errortrace element and return its pointer (not copy). If there is no next errortrace element NULL will be returned |
Returns: |
pointer to the errortrace structure |
char* ACSErr::ErrorTraceHelper::getProcessName () [inline] Retruns process information of the error. Its name or process ID. |
Returns: |
pointer to the char points to the copy of process information |
References m_current. |
char* ACSErr::ErrorTraceHelper::getRoutine () [inline] Returns routine information of tehe error |
Returns: |
pointer to char contains routine name |
References m_current. |
ACSErr::Severity ACSErr::ErrorTraceHelper::getSeverity () [inline] Returns error severity |
References m_current. |
char* ACSErr::ErrorTraceHelper::getShortDescription () Returns copy of short description of current error. User have to take care of releasing it! |
Returns: |
pointer to the char (=string) |
char* ACSErr::ErrorTraceHelper::getSourceObject () [inline] Returns source object information of the error. |
Returns: |
pointer to the char points to the copy of the source object (caller has to delete it). |
References m_current. |
char* ACSErr::ErrorTraceHelper::getThread () [inline] Returns thread information of the error. The name of thread or its ID. |
Returns: |
pointer to the char points to the copy of thread information |
References m_current. |
static ACS::Time ACSErr::ErrorTraceHelper::getTime () [static] |
CORBA::ULongLong ACSErr::ErrorTraceHelper::getTimeStamp () [inline] Returns time stamp of the error in 100th of nanoseconds. |
Returns: |
CORBA::ULongLong time stamp |
References m_current. |
bool ACSErr::ErrorTraceHelper::last () [inline] Tells if we are at the end of error trace. This method should be used with combination of getNext to find out when the end of the error trace is reached. |
Returns: |
true if we reach the end of error trace otherwise false |
References m_current, and m_depth. |
void ACSErr::ErrorTraceHelper::log (ACE_Log_Priority priorty = LM_ERROR) Logs the complete error trace into the logging system. For each such exception in the trace, a separate log entry is created, in accordance with the ACS error logging specification. |
Parameters: |
priorty,: priorty with which the error trace will be logged If priorty is not specified the completion/error trace will be logged with ERROR priorty. The priority can be used to log an important error trace at LM_DEBUG level before sending it to a remote client. The responsibility of ultimately decide is an error trace shall be logged or closed is ultimately left to the higher level client, but a bad behaving client could ’forget’ to log. In order to make sure potentially critical information is not lost, the servant application can decide to log anyway the error trace as debug information before sending it to the client. |
Referenced by AcsBulkdata::BulkDataDistributerNotifCb< BulkDataDistributerStreamCb, BulkDataSenderDefaultCallback >::done(), BaciTestClassImpl::turnOffMonitoring(), and BaciTestClassImpl::turnOnMonitoring(). |
void ACSErr::ErrorTraceHelper::log (ACSErr::ErrorTrace * c, int level, char * stackId, ACE_Log_Priority priorty = LM_ERROR) [protected] Logs just a single part (item) of an errortrace into the logging system. This method is used internaly by the log method |
Parameters: |
c pointer to error trace structure |
ErrorTraceHelper& ACSErr::ErrorTraceHelper::operator= (ACSErr::ErrorTrace & eth) [protected] assigning ACSErr::ErrorTrace directly |
void ACSErr::ErrorTraceHelper::setError (ACSErr::ACSErrType ty, ACSErr::ErrorCode ec) [inline] Sets current error code |
Parameters: |
ty error type (should be of type
ACSErr::ACSErrType defined in acserrType.idl) |
References m_current. |
void ACSErr::ErrorTraceHelper::setErrorTrace (ACSErr::ErrorTrace & et, int depth) [protected] |
void ACSErr::ErrorTraceHelper::setFileName (const char * fn) [inline] Sets file name |
Parameters: |
fn file name |
References m_current. |
static void ACSErr::ErrorTraceHelper::setHostName (const char * hn) [static] Sets host name |
Parameters: |
hn host name |
void ACSErr::ErrorTraceHelper::setLineNumber (CORBA::ULong ln) [inline] Sets line number |
Parameters: |
ln line number |
References m_current. |
void ACSErr::ErrorTraceHelper::setMemberValue (const char * name, const char * value) Sets member value of current error. This method is mainly used by generated code. If this function is used the fist time it adds new name-value pair. |
Parameters: |
name data name. If name or value are NULL it
returns w/o setting anything. |
Referenced by setMemberValue(). |
void ACSErr::ErrorTraceHelper::setMemberValue (const char * name, ACE_CString & value) Version of setMember that takes value as ACE_CString. This method is mainly used by generated code. If this function is used the fist time it adds new name-value pair. |
Parameters: |
name data name. If name is NULL it returns w/o
setting anything. |
template<typename T > void ACSErr::ErrorTraceHelper::setMemberValue (const char * name, T value) [inline] Sets member value. Template version of setMemberValue. This method is mainly used by generated code. It works for all types that can be put to std::ostringstream like: int, string and double. |
Parameters: |
name member name. If name is NULL it returns w/o
setting anything. |
References setMemberValue(). |
static void ACSErr::ErrorTraceHelper::setProcessName (const char * pn) [static] Sets process name |
Parameters: |
process name |
void ACSErr::ErrorTraceHelper::setSeverity (ACSErr::Severity severity) [inline] Sets error severity |
Parameters: |
severity errro severity |
References m_current. |
void ACSErr::ErrorTraceHelper::setSourceObject (const char * so) [inline] Sets source object |
Parameters: |
source object |
References m_current. |
void ACSErr::ErrorTraceHelper::setTimeStamp (CORBA::ULongLong time) [inline] Sets time stamp of the error in 100th of nanoseconds. time CORBA::ULongLong time stamp |
References m_current. |
ACSErr::ErrorTrace* ACSErr::ErrorTraceHelper::top () [inline] Moves to the first (top) errortrace element and return its pointer (not copy). |
Returns: |
pointer to the errortrace structure |
References m_current, and m_errorTracePtr. |
void ACSErr::ErrorTraceHelper::toString (ACSErr::ErrorTrace * c, int level, std::ostringstream & oss) [protected] |
std::string ACSErr::ErrorTraceHelper::toString () Returns a string describing the error on top of the error trace. |
friend class ::ACSError [friend] |
friend class ::ACSLogImpl [friend] |
friend class CompletionImpl [friend] |
ACSErr::ErrorTrace* ACSErr::ErrorTraceHelper::m_current [protected] |
Referenced by getErrorCode(), getErrorTrace(), getErrorType(), getFileName(), getHostName(), getLineNumber(), getProcessName(), getRoutine(), getSeverity(), getSourceObject(), getThread(), getTimeStamp(), last(), setError(), setFileName(), setLineNumber(), setSeverity(), setSourceObject(), setTimeStamp(), and top(). |
unsigned int ACSErr::ErrorTraceHelper::m_depth [protected] |
Referenced by getDepth(), and last(). |
ACSErr::ErrorTrace* ACSErr::ErrorTraceHelper::m_errorTracePtr [protected] |
Referenced by top(). |
char ACSErr::ErrorTraceHelper::m_hostName[64] [static, protected] |
const unsigned int ACSErr::ErrorTraceHelper::m_maxDepth [static, protected] |
char ACSErr::ErrorTraceHelper::m_processName[64] [static, protected] |
Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code. |