wibble 0.1.28
|
Exception thrown when some value is out of range. More...
#include <exception.h>
Public Member Functions | |
OutOfRange (const std::string &var_desc, const std::string &context) throw () | |
~OutOfRange () throw () | |
virtual const char * | type () const throw () |
Get a string tag identifying the exception type. | |
virtual std::string | var_desc () const throw () |
Get a short description of the variable that has been checked. | |
virtual std::string | desc () const throw () |
Get a string describing what happened that threw the exception. | |
Protected Attributes | |
std::string | m_var_desc |
Exception thrown when some value is out of range.
Usage:
if (age < 200) throw OutOfRange("age", "ensuring that no mere mortal is using the system");
wibble::exception::OutOfRange::OutOfRange | ( | const std::string & | var_desc, |
const std::string & | context | ||
) | throw () [inline] |
wibble::exception::OutOfRange::~OutOfRange | ( | ) | throw () [inline] |
virtual std::string wibble::exception::OutOfRange::desc | ( | ) | const throw () [inline, virtual] |
Get a string describing what happened that threw the exception.
Reimplemented from wibble::exception::Consistency.
Reimplemented in wibble::exception::ValOutOfRange< C >.
References m_var_desc.
virtual const char* wibble::exception::OutOfRange::type | ( | ) | const throw () [inline, virtual] |
Get a string tag identifying the exception type.
Reimplemented from wibble::exception::Consistency.
Reimplemented in wibble::exception::ValOutOfRange< C >.
virtual std::string wibble::exception::OutOfRange::var_desc | ( | ) | const throw () [inline, virtual] |
Get a short description of the variable that has been checked.
References m_var_desc.
std::string wibble::exception::OutOfRange::m_var_desc [protected] |
Referenced by desc(), and var_desc().