|
davix
0.2.8
|
Davix Error Handler. More...
#include <davixstatusrequest.hpp>
Public Member Functions | |
| DavixError (const std::string &scope, StatusCode::Code errCode, const std::string &errMsg) | |
| DavixError (const DavixError &e) | |
| copy constructor More... | |
| DavixError & | operator= (const DavixError &e) |
| assignment operator More... | |
| virtual | ~DavixError () |
| ~DavixError | |
| DavixError * | clone () |
| clone Error More... | |
| StatusCode::Code | getStatus () const |
| void | setStatus (const StatusCode::Code) |
| const std::string & | getErrMsg () const |
| void | setErrMsg (const std::string &msg) |
| void | setErrScope (const std::string &scope) |
| const std::string & | getErrScope () const |
Static Public Member Functions | |
| static void | setupError (DavixError **err, const std::string &scope, StatusCode::Code errCode, const std::string &errMsg) |
| create a new DavixError More... | |
| static void | clearError (DavixError **err) |
| static void | propagateError (DavixError **newErr, DavixError *oldErr) |
| propagate an Error structure to an upper level More... | |
| static void | propagatePrefixedError (DavixError **newErr, DavixError *oldErr, const std::string &prefix) |
| propagatePrefixedError More... | |
Davix Error Handler.
Error report system of Davix, similar behavior to the Glib Error report Davix does not use C++ exception
Each function which takes a DavixError** as argument can take the value NULL
Example :
| Davix::DavixError::DavixError | ( | const std::string & | scope, |
| StatusCode::Code | errCode, | ||
| const std::string & | errMsg | ||
| ) |
Construct a DavixError object
| scope | : string parameter representing the scope of the error |
| errCode | : Davix Error code, see Davix::StatusCode::Code |
| errMsg | : String representation of the error |
| Davix::DavixError::DavixError | ( | const DavixError & | e | ) |
copy constructor
| e |
|
static |
clear the content of the current error and set err to NULL
| DavixError* Davix::DavixError::clone | ( | ) |
clone Error
| const std::string& Davix::DavixError::getErrMsg | ( | ) | const |
get the string representation of this error
| const std::string& Davix::DavixError::getErrScope | ( | ) | const |
get the scope of this error
| StatusCode::Code Davix::DavixError::getStatus | ( | ) | const |
| DavixError& Davix::DavixError::operator= | ( | const DavixError & | e | ) |
assignment operator
| e |
|
static |
propagate an Error structure to an upper level
| newErr | |
| oldErr | propagate the Davix Error Object from oldErr to newErr OldErr can be consider as free after this operation erase the current error if newErr is not NULL |
|
static |
propagatePrefixedError
| newErr | |
| oldErr | |
| prefix | same than propagateError but add a string prefix in front of the error description |
| void Davix::DavixError::setErrMsg | ( | const std::string & | msg | ) |
set the string representation of this error
| void Davix::DavixError::setErrScope | ( | const std::string & | scope | ) |
set the scope of this error
| void Davix::DavixError::setStatus | ( | const StatusCode::Code | ) |
set the status code for this error
|
static |
create a new DavixError
| err | pointer to a DavixError pointer |
| scope | scope of the Error |
| errCode | Error code |
| errMsg | Error message |
create a new dynamically allocated DavixError Object if err is NULL, silent suppress the error report
1.8.3.1