5 #ifndef _DDS_ERRORCODE_H_ 6 #define _DDS_ERRORCODE_H_ 27 #define SUCCEEDED(er) (er <= erOK) 28 #define FAILED(er) (!SUCCEEDED(er)) 53 char* p = strerror(errno);
65 char* p = strerror(errno);
66 return std::string(p);
82 const char*
const szError = strerror(m_errno);
84 if (!_ErrorPrefix.empty())
85 ss << _ErrorPrefix <<
". ";
86 ss <<
"System error description [" << m_errno <<
"]: " << szError;
92 virtual const char*
what()
const throw()
107 #endif // _DDS_ERRORCODE_H_ virtual const char * what() const
Definition: ErrorCode.h:92
ERRORCODE_C erNULLArg(BASE_FOR_GENERAL_ERR+1)
ERRORCODE_C erXMLNullNode(BASE_FOR_XML_ERR+3)
ERRORCODE_C erOK(EXIT_SUCCESS)
ERRORCODE_C erXMLReadConfig(BASE_FOR_XML_ERR+2)
ERRORCODE_C erXMLInit(BASE_FOR_XML_ERR+1)
int ERRORCODE
Definition: ErrorCode.h:18
ERRORCODE_C erFILE_NOT_FOUND(BASE_FOR_GENERAL_ERR+2)
ERRORCODE_C BASE_FOR_XML_ERR(100)
int errno2str(std::string *_msg)
Retrieves a string, which represent the last error.
Definition: ErrorCode.h:49
The system_error exception class retrieves a string, which represent the last error.
Definition: ErrorCode.h:76
int getErrno() const
Definition: ErrorCode.h:96
ERRORCODE_C erError(EXIT_FAILURE)
const ERRORCODE ERRORCODE_C
Definition: ErrorCode.h:19
virtual ~system_error()
Definition: ErrorCode.h:89
system_error(const std::string &_ErrorPrefix)
Definition: ErrorCode.h:79
ERRORCODE_C BASE_FOR_GENERAL_ERR(50)
Definition: BoostHelper.h:14