This class handles errors in apollo Sends messages to Apollo message handler Can also return a QError class
M.P. & A.G. created 19/07/06
Public Member Functions | |
| virtual | ~QApolloError () |
| Destructor. | |
| void | Reset () |
| reset error | |
| void | Set (const std::string &Where, MsgLevel Sev, const std::string &Error, QError_ code=QERR_SUCCESS) |
| Set error using std::string. | |
| void | Set (const char *Where, MsgLevel Sev, const char *Error, QError_ code=QERR_SUCCESS) |
| Set error using C strings. | |
| bool | IsError () const |
| MsgLevel | GetSeverity () const |
| const std::string & | GetError () const |
| const std::string & | GetWhere () const |
| const QError & | GetQError () |
| Return error as class QError. | |
Static Public Member Functions | |
| static QApolloError * | Get () |
| singleton statis get | |
Private Member Functions | |
| QApolloError () | |
| Private ctor for singleton. | |
Private Attributes | |
| std::string | fWhere |
| Name of function where error occurred. | |
| MsgLevel | fSeverity |
| Severity level. | |
| std::string | fErrorString |
| Error message. | |
| QError_ | fCode |
| Error code as defined in class QError.hh. | |
| QError | fError |
| Static QError object used for error return. | |
Static Private Attributes | |
| static QApolloError * | fMe |
| void QApolloError::Set | ( | const std::string & | Where, | |
| MsgLevel | Sev, | |||
| const std::string & | Error, | |||
| QError_ | code = QERR_SUCCESS | |||
| ) |
Set error using std::string.
When an error is Set, a message is sent to the MsgServer according to its severity. The name of the function where error occurred is also reported together with an error description.
| Where | name of the function where error occurred | |
| Sev | severity level of this error defined in QApolloMessenger.hh | |
| Error | error message | |
| code | Error code as defined in QError.hh |
| void QApolloError::Set | ( | const char * | Where, | |
| MsgLevel | Sev, | |||
| const char * | Error, | |||
| QError_ | code = QERR_SUCCESS | |||
| ) | [inline] |
Set error using C strings.
| Where | name of the function where error occurred | |
| Sev | severity level of this error defined in QApolloMessenger.hh | |
| Error | error message | |
| code | Error code as defined in QError.hh |
| bool QApolloError::IsError | ( | ) | const [inline] |
| MsgLevel QApolloError::GetSeverity | ( | ) | const [inline] |
| const std::string& QApolloError::GetError | ( | ) | const [inline] |
| const std::string& QApolloError::GetWhere | ( | ) | const [inline] |
QError QApolloError::fError [private] |
1.5.1