libsarathi exception class More...
#include <libsarathi.hpp>
Public Member Functions | |
sException () throw () | |
Empty constructor. | |
sException (std::string faultstr, std::string detailstr) throw () | |
Constructor with fault and detail descriptions. | |
sException (std::string faultstr, std::string detailstr, int errcode) throw () | |
Constructor with fault and detail descriptions and a numerical errorcode. | |
virtual const char * | detail () const throw () |
Function returning a string describing the fault in detail. | |
virtual const char * | hint () const throw () |
Function returning a string giving a hint about how to fix the faule. | |
virtual void | get_exceptiondata (hyperpoint &point) const throw () |
Get a hyperpoint containing data relevant to the exception. | |
virtual void | get_exceptiondata (hyperarray &array) const throw () |
Get a hyperarray containing data relevant to the exception. | |
virtual int | errorcode () const throw () |
Get an errorcode describing the exception. |
libsarathi exception class
An object of this class is thrown when a function in the libsarathi API encounters and error.
Definition at line 29 of file libsarathi.hpp.
libsarathi::sException::sException | ( | ) | throw () |
Empty constructor.
Sets the hint and detail strings to default values
Definition at line 24 of file libsarathi.cpp.
libsarathi::sException::sException | ( | std::string | faultstr, | |
std::string | detailstr | |||
) | throw () |
Constructor with fault and detail descriptions.
[in] | faultstr | String describing the fault |
[in] | detailstr | String describing the fault detail |
Definition at line 31 of file libsarathi.cpp.
libsarathi::sException::sException | ( | std::string | faultstr, | |
std::string | detailstr, | |||
int | errcode | |||
) | throw () |
Constructor with fault and detail descriptions and a numerical errorcode.
The errorcode is generally one of those described in <errno.h>
[in] | faultstr | String describing the fault |
[in] | detailstr | String describing the fault detail |
[in] | errcode | integer describing the error |
Definition at line 39 of file libsarathi.cpp.
const char * libsarathi::sException::detail | ( | ) | const throw () [virtual] |
Function returning a string describing the fault in detail.
Definition at line 54 of file libsarathi.cpp.
int libsarathi::sException::errorcode | ( | ) | const throw () [virtual] |
Get an errorcode describing the exception.
The error code is a symbolic constant defined in <errno.h>
Definition at line 76 of file libsarathi.cpp.
void libsarathi::sException::get_exceptiondata | ( | hyperarray & | array | ) | const throw () [virtual] |
Get a hyperarray containing data relevant to the exception.
[out] | point | A hyperarray containing exception data |
Definition at line 70 of file libsarathi.cpp.
void libsarathi::sException::get_exceptiondata | ( | hyperpoint & | point | ) | const throw () [virtual] |
Get a hyperpoint containing data relevant to the exception.
[out] | point | A hyperpoint containing exception data |
Definition at line 64 of file libsarathi.cpp.
const char * libsarathi::sException::hint | ( | ) | const throw () [virtual] |
Function returning a string giving a hint about how to fix the faule.
Definition at line 59 of file libsarathi.cpp.