19#ifndef _GIMLI_EXITCODES__H
20#define _GIMLI_EXITCODES__H
32inline void throwToImplement(
const std::string & errString){
34 throw std::length_error(errString);
36 std::cerr << errString << std::endl;
40inline void throwRangeError(
const std::string & errString,
int idx,
int low,
int high){
41 std::stringstream str(errString);
42 str <<
" " << idx <<
" [" << low <<
".." << high <<
")" << std::endl;
44 throw std::out_of_range(str.str());
46 std::cerr << str.str() << std::endl;
50inline void throwLengthError(
const std::string & errString){
52 throw std::length_error(errString);
54 std::cerr << errString << std::endl;
58DLLEXPORT
bool debug();
60inline void throwError(
const std::string & errString){
63 std::cerr <<
"Debug: " << errString << std::endl;
65 throw std::length_error(errString);
67 std::cerr << errString << std::endl;
GIMLi main namespace for the Geophyiscal Inversion and Modelling Library.
Definition baseentity.h:24