|
GammaLib 2.2.0.dev
|
#include <GException.hpp>
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]. | |
Public Member Functions inherited from GExceptionHandler | |
| GExceptionHandler () | |
| virtual | ~GExceptionHandler () throw () |
| virtual const char * | what () const throw () |
| Exception message. | |
Additional Inherited Members | |
Protected Attributes inherited from GExceptionHandler | |
| std::string | m_origin |
| std::string | m_message |
Definition at line 105 of file GException.hpp.
| 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].
| [in] | origin | Method throwing the exception. |
| [in] | what | Describes what is out of range. |
| [in] | index | Index. |
| [in] | elements | Number of elements. |
| [in] | message | Optional 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(), gammalib::tolower(), and GExceptionHandler::what().