GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GException::out_of_range Class Reference

#include <GException.hpp>

Inheritance diagram for GException::out_of_range:
GExceptionHandler

Public Member Functions

 out_of_range (const std::string &origin, const std::string &what, const int &index, const int &elements, const std::string &message="")
 Index is out of range [0,elements-1]. More...
 
- Public Member Functions inherited from GExceptionHandler
 GExceptionHandler ()
 
virtual ~GExceptionHandler () throw ()
 
virtual const char * what () const throw ()
 Exception message. More...
 

Additional Inherited Members

- Protected Attributes inherited from GExceptionHandler
std::string m_origin
 
std::string m_message
 

Detailed Description

Definition at line 105 of file GException.hpp.

Constructor & Destructor Documentation

GException::out_of_range::out_of_range ( const std::string &  origin,
const std::string &  what,
const int &  index,
const int &  elements,
const std::string &  message = "" 
)

Index is out of range [0,elements-1].

Parameters
[in]originMethod throwing the exception.
[in]whatDescribes what is out of range.
[in]indexIndex.
[in]elementsNumber of elements.
[in]messageOptional error message.

The what string specifies the index type that is out of range. For example what="Vector index" will lead to "Vector index <index> is ...". The first letter in what is expected to be a capital letter.

Definition at line 158 of file GException.cpp.

References GExceptionHandler::m_message, GExceptionHandler::m_origin, gammalib::str(), gammalib::strip_whitespace(), and gammalib::tolower().


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