|
wibble
0.1.28
|
Exception thrown when index checking fails. More...
#include <exception.h>


Public Member Functions | |
| ValOutOfRange (const std::string &var_desc, C val, C inf, C sup, const std::string &context) throw () | |
| Construct the exception; minBound and maxBound are the bounds of the valid index range (inclusive). | |
| virtual const char * | type () const throw () |
| Get a string tag identifying the exception type. | |
| virtual std::string | desc () const throw () |
| Get a string describing what happened that threw the exception. | |
Methods used to get informations about the index and its bounds | |
| virtual C | val () const throw () |
| Get the value that caused the index to go out-of-bounds. | |
| virtual C | inf () const throw () |
| Get the minimum allowed value for this index. | |
| virtual C | sup () const throw () |
| Get the maximum allowed value for this index. | |
Public Member Functions inherited from wibble::exception::OutOfRange | |
| OutOfRange (const std::string &var_desc, const std::string &context) throw () | |
| ~OutOfRange () throw () | |
| virtual std::string | var_desc () const throw () |
| Get a short description of the variable that has been checked. | |
Public Member Functions inherited from wibble::exception::Consistency | |
| Consistency (const std::string &context, const std::string &error=std::string()) throw () | |
| ~Consistency () throw () | |
Public Member Functions inherited from wibble::exception::Generic | |
| Generic () throw () | |
| Generic (const std::string &context) throw () | |
| virtual | ~Generic () throw () |
| virtual const std::string & | fullInfo () const throw () |
| Format in a string all available information about the exception. | |
| virtual const char * | what () const throw () |
Public Member Functions inherited from wibble::exception::Context | |
| Context () throw () | |
| Context (const std::string &context) throw () | |
| void | addContext (const std::string &c) throw () |
| std::string | formatContext () const throw () |
| const std::vector< std::string > & | context () const throw () |
Protected Attributes | |
| C | m_val |
| C | m_inf |
| C | m_sup |
Protected Attributes inherited from wibble::exception::OutOfRange | |
| std::string | m_var_desc |
Exception thrown when index checking fails.
This exception is to be thrown when an index checking fails, providing informations on the acceptable index range and on the offending value. The context should be a description of the index, possibly preceeded by a description of in what context did the index checking happen.
Example:
|
inline |
Construct the exception; minBound and maxBound are the bounds of the valid index range (inclusive).
|
virtual |
Get a string describing what happened that threw the exception.
Reimplemented from wibble::exception::OutOfRange.
Referenced by wibble::exception::File::desc().
|
inlinevirtual |
Get the minimum allowed value for this index.
References wibble::exception::ValOutOfRange< C >::m_inf.
|
inlinevirtual |
Get the maximum allowed value for this index.
References wibble::exception::ValOutOfRange< C >::m_sup.
|
inlinevirtual |
Get a string tag identifying the exception type.
Reimplemented from wibble::exception::OutOfRange.
|
inlinevirtual |
Get the value that caused the index to go out-of-bounds.
References wibble::exception::ValOutOfRange< C >::m_val.
|
protected |
Referenced by wibble::exception::ValOutOfRange< C >::inf().
|
protected |
Referenced by wibble::exception::ValOutOfRange< C >::sup().
|
protected |
Referenced by wibble::exception::ValOutOfRange< C >::val().
1.8.1