GammaLib  1.7.0.dev
 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 (std::string origin, int inx, int min, int max)
 Index is out of range. More...
 
 out_of_range (std::string origin, double value, double min, double max)
 Value is out of range. More...
 
 out_of_range (std::string origin, int inx, int elements)
 Vector index is out of range. More...
 
 out_of_range (std::string origin, int row, int col, int rows, int cols)
 Matrix index is out of range. More...
 
 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 93 of file GException.hpp.

Constructor & Destructor Documentation

GException::out_of_range::out_of_range ( std::string  origin,
int  inx,
int  min,
int  max 
)

Index is out of range.

Parameters
[in]originMethod throwing the exception.
[in]inxIndex.
[in]minMinimum of valid range.
[in]maxMaximum of valid range.

Definition at line 58 of file GException_linalg.cpp.

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

GException::out_of_range::out_of_range ( std::string  origin,
double  value,
double  min,
double  max 
)

Value is out of range.

Parameters
[in]originMethod throwing the exception.
[in]valueValue.
[in]minMinimum of valid range.
[in]maxMaximum of valid range.

Definition at line 83 of file GException_linalg.cpp.

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

GException::out_of_range::out_of_range ( std::string  origin,
int  inx,
int  elements 
)

Vector index is out of range.

Parameters
[in]originMethod throwing the exception.
[in]inxIndex.
[in]elementsNumber of vector elements.

Definition at line 107 of file GException_linalg.cpp.

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

GException::out_of_range::out_of_range ( std::string  origin,
int  row,
int  col,
int  rows,
int  cols 
)

Matrix index is out of range.

Parameters
[in]originMethod throwing the exception.
[in]rowRow index.
[in]colColumn index.
[in]rowsNumber of rows in matrix.
[in]colsNumber of columns in matrix.

Definition at line 137 of file GException_linalg.cpp.

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

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 127 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: