wibble::exception::OutOfRange Class Reference

Exception thrown when some value is out of range. More...

#include <exception.h>

Inheritance diagram for wibble::exception::OutOfRange:
[legend]
Collaboration diagram for wibble::exception::OutOfRange:
[legend]

List of all members.

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

Detailed Description

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");

Constructor & Destructor Documentation

wibble::exception::OutOfRange::OutOfRange ( const std::string &  var_desc,
const std::string &  context 
) throw () [inline]
wibble::exception::OutOfRange::~OutOfRange (  )  throw () [inline]

Member Function Documentation

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.


Member Data Documentation

Referenced by desc(), and var_desc().


The documentation for this class was generated from the following file:

Generated on Mon Jan 4 20:41:54 2010 for wibble by  doxygen 1.6.1