13 #include "../Core/SharedLibraryExportMacros.h" 27 class LIB_PUBLIC
General :
public std::exception {
32 General(
const std::string &error_message=
"") :
33 message(error_message)
35 std::cerr << what() <<
": " << error_message << std::endl;
39 virtual const char *
what()
const throw() {
return "general error";}
52 ALGLIB(
const std::string &error_message=
"") :
56 virtual const char *
what()
const throw()
57 {
return "ALGLIB error";}
64 Runtime(
const std::string &error_message=
"") :
68 virtual const char *
what()
const throw()
69 {
return "Run time error";}
81 virtual const char *
what()
const throw()
82 {
return "Bad function arguments";}
93 virtual const char *
what()
const throw()
94 {
return "Invalid stellar zone";}
105 const std::string &filename=
"",
107 Runtime(filename+
", "+message), directory(isdir) {}
110 virtual const char *
what()
const throw() {
112 "Directory not found." :
121 IO(
const std::string &filename=
"",
122 const std::string &error_message=
"") :
123 Runtime(
"Error reading "+filename+
", " 126 virtual const char *
what()
const throw() {
return "I/O error";}
137 virtual const char *
what()
const throw()
138 {
return "Error parsing the command line";}
146 Runtime(feature_name+
" not implemented yet") {}
149 virtual const char *
what()
const throw()
150 {
return "Not implemented";}
158 Runtime(
"GSL "+gsl_step_type+
" step size control requires zero " 159 "step size, aborting!") {}
162 virtual const char *
what()
const throw()
163 {
return "Tiny step";}
171 Runtime(
"Breaking due to condtions or NaNs has decreased " 172 "maximum step size to zero! Aborting") {}
175 virtual const char *
what()
const throw()
176 {
return "Tiny step";}
virtual ~General()
Cleanup if necessary.
virtual const char * what() const
Reports "Invalid stellar zone" as the error type.
Maximum allowed step size decreased below machine precision.
virtual const char * what() const
Returns "Tiny step" as the error type.
Function arguments do not satisfy some requirement.
IO(const std::string &filename="", const std::string &error_message="")
Create an Input/Ouput exception.
virtual const char * what() const
Reports "Bad function arguments" as the erorr type.
The base class of all exceptions.
NotImplemented(const std::string &feature_name="")
Create a not-implemented exception.
bool directory
Whether the problem was with a directory and not a file.
PathNotFound(const std::string &message, const std::string &filename="", bool isdir=false)
Create a missing file or directory exception.
virtual const char * what() const
Returns "Tiny step" as the error type.
Runtime(const std::string &error_message="")
Create a runtime exception.
Error detected by the ALGLIB library.
Exception indicating unrecognized or unsuitable stellar zone.
Exception indicating that a file or a directory was not found.
virtual const char * what() const
Returns "Not implemented" as the error type.
virtual const char * what() const
Reports "ALGLIB error" as the error type.
ALGLIB(const std::string &error_message="")
Create an exception for an error detected inside ALGLIB.
Encountered an unimplemented feature.
virtual const char * what() const
The type of error.
CommandLine(const std::string &error_message="")
Create command line parsing exception.
virtual const char * what() const
Reports "I/O error" as the error type.
virtual const char * what() const
Reports "Run time error" as the eror type.
Error related to parsing the command line.
BadStellarZone(const std::string &error_message="")
Create a bad stellar zone exception.
virtual const char * what() const
Returns "Error parsing the command line" as the error type.
const std::string & get_message()
Details about what caused the error.
NonGSLZeroStep()
Create a too-small GSL step size exception.
General(const std::string &error_message="")
Create an exception.
virtual const char * what() const
Reports "File/Directory not found" as the error type.
GSL step size decreased below machine precision.
GSLZeroStep(const std::string &gsl_step_type)
Create a too-small GSL step size exception.
BadFunctionArguments(const std::string &error_message="")
Create bad function arguments exception.