Exception handling standard UNIX errors (errno) More...
#include <senf/Utils/Exception.hh>
Public Member Functions | |
int | errorNumber () const |
Error code (errno number) More... | |
char const * | errorString () const |
Error string (strerror() value) More... | |
bool | anyOf (int c0, int c1=0, int c2=0, int c3=0, int c4=0, int c5=0, int c6=0, int c7=0, int c8=0, int c9=0) const |
true , if errorNumber() is one of c0 ... c9 More... | |
Public Member Functions inherited from senf::Exception | |
virtual | ~Exception () throw () |
virtual char const * | what () const throw () |
get exception description and backtrace if available More... | |
Public Member Functions inherited from senf::ExceptionMixin | |
std::string | message () const |
get exception description More... | |
std::string | backtrace () const |
Return backtrace (if available) More... | |
void | append (std::string text) |
Extend exception description. More... | |
Structors and default members | |
SystemException (std::string const &descr="" _SENF_EXC_DEBUG_ARGS) | |
SystemException (int code _SENF_EXC_DEBUG_ARGS) | |
SystemException (std::string const &descr, int code _SENF_EXC_DEBUG_ARGS) | |
virtual | ~SystemException () throw () |
Additional Inherited Members | |
Protected Member Functions inherited from senf::Exception | |
Exception (std::string const &description="") | |
Protected Member Functions inherited from senf::ExceptionMixin | |
ExceptionMixin (std::string const &description="") | |
Initialize exception with string. More... | |
Protected Attributes inherited from senf::ExceptionMixin | |
std::string | what_ |
Exception handling standard UNIX errors (errno)
This exception is thrown to signal generic errno
failures. Normally the errno
value is automatically taken from the errno
variable but it may also be specified explicitly:
From within SENF (<em>and only there because it depends on the \c SENF_DEBUG symbol</em>), SystemException should be thrown using wrapper macros which add additional information to the exception description:
Definition at line 286 of file Exception.hh.
|
explicit |
|
explicit |
senf::SystemException::SystemException | ( | std::string const & | descr, |
int code | _SENF_EXC_DEBUG_ARGS | ||
) |
|
virtual |
bool senf::SystemException::anyOf | ( | int | c0, |
int | c1 = 0 , |
||
int | c2 = 0 , |
||
int | c3 = 0 , |
||
int | c4 = 0 , |
||
int | c5 = 0 , |
||
int | c6 = 0 , |
||
int | c7 = 0 , |
||
int | c8 = 0 , |
||
int | c9 = 0 |
||
) | const |
true
, if errorNumber() is one of c0 ... c9
int senf::SystemException::errorNumber | ( | ) | const |
Error code (errno
number)
char const* senf::SystemException::errorString | ( | ) | const |
Error string (strerror()
value)