54 const std::string& message)
61 if (message.length() > 0) {
77 const std::string& message)
84 if (message.length() > 0) {
103 const std::string& argument,
104 const std::string& message)
110 m_message =
"Invalid argument \""+argument+
"\" value.";
113 if (message.length() > 0) {
129 const std::string& message)
136 if (message.length() > 0) {
159 const std::string&
what,
162 const std::string& message)
174 m_message =
"Invalid access to empty object with " +
178 if (message.length() > 0) {
194 const std::string& message)
201 if (message.length() > 0) {
219 const std::string& message)
231 if (message.length() > 0) {
247 const std::string& message)
254 if (message.length() > 0) {
273 const std::string& message)
279 if (message.length() > 0) {
285 m_message +=
" In case that you need this feature for your application"
286 " please submit a feature request on"
287 " https://cta-redmine.irap.omp.eu/projects/gammalib/,"
288 " join this error message and provide a detailed"
289 " description of your needs.";
303 const std::string& message)
307 m_message =
"Nested try error ("+message+
")";
322 const std::string& message)
326 m_message =
"Failure Test ("+message+
")";
341 const std::string& message)
370 std::string msg =
"Minimum energy "+emin.
print()+
" is equal to "
371 "maximum energy "+emax.
print()+
". Please specify "
372 "a minimum energy that is smaller than the maximum "
376 else if (emin > emax) {
377 std::string msg =
"Minimum energy "+emin.
print()+
" is larger than "
378 "maximum energy "+emax.
print()+
". Please specify a "
379 "minimum energy that is smaller than the maximum "
408 std::string msg =
"One invalid (x,y) coordinate specified. Please "
409 "make sure that only valid (x,y) coordinates "
414 std::string msg =
gammalib::str(number)+
" invalid (x,y) coordinates "
415 "specified. Please make sure that only valid "
416 "(x,y) coordinates are specified.";
445 std::string msg =
"One invalid (phi,theta) coordinate specified. "
446 "Please make sure that only valid (phi,theta) "
447 "coordinates are specified.";
451 std::string msg =
gammalib::str(number)+
" invalid (phi,theta) "
452 "coordinates specified. Please make sure that "
453 "only valid (phi,theta) coordinates are specified.";
test_error(const std::string &origin, const std::string &message="")
Failure test.
std::string number(const std::string &noun, const int &number)
Convert singular noun into number noun.
Energy value class definition.
file_error(const std::string &origin, const std::string &message="")
File error.
invalid_value(const std::string &origin, const std::string &message)
Invalid value.
test_failure(const std::string &origin, const std::string &message="")
Failure test.
std::string strip_whitespace(const std::string &arg)
Strip leading and trailing whitespace from string.
test_nested_try_error(const std::string &origin, const std::string &message="")
Test nested try error.
char * tochar(const std::string &arg)
Convert string to C string.
std::string print(const GChatter &chatter=NORMAL) const
Print energy.
CFITSIO interface header.
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].
runtime_error(const std::string &origin, const std::string &message="")
Runtime error.
void check_energy_interval(const std::string &origin, const GEnergy &emin, const GEnergy &emax)
Checks energy interval.
virtual const char * what() const
Exception message.
invalid_return_value(const std::string &origin, const std::string &message)
Invalid return value.
void check_prj_s2x_status(const std::string &origin, const int &status, const int &number)
Checks status of GWcs::prj_s2x method.
void check_prj_x2s_status(const std::string &origin, const int &status, const int &number)
Checks status of GWcs::prj_x2s method.
Exception handler interface definition.
std::string tolower(const std::string &s)
Convert string to lower case.
invalid_argument(const std::string &origin, const std::string &message)
Invalid argument.
feature_not_implemented(const std::string &origin, const std::string &message="")
Feature not implement.
fits_error(const std::string &origin, const int &status, const std::string &message="")
General FITS error.
Class that handles energies in a unit independent way.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.