15 static const char* stars =
"***********************************************************************\n";
18 procedure_(procedure),
27 procedure_(procedure),
70 ss <<
"Array size (" << sz_ <<
") too small. Must be at least " << reqd_ <<
".";
77 ss <<
"IndexError: " << arrayName_ <<
"[" << m_ <<
"]" <<
78 " outside valid range of 0 to " << (mmax_) <<
".";
85 fegetexceptflag(&ff, FE_OVERFLOW || FE_UNDERFLOW || FE_INVALID);
95 feclearexcept(FE_ALL_EXCEPT);
std::string formattedMessage_
Formatted message returned by what()
bool saved_
Exception has already been saved to Cantera's error stack.
void addError(const std::string &r, const std::string &msg)
Set an error condition in the application class without throwing an exception.
std::string msg_
Message associated with the exception.
virtual std::string getMessage() const
Method overridden by derived classes to format the error message.
const char * what() const
Get a description of the error.
std::string procedure_
The name of the procedure where the exception occurred.
bool check_FENV_OverUnder_Flow()
Quick check on whether there has been an underflow or overflow condition in the floating point unit...
virtual std::string getMessage() const
Method overridden by derived classes to format the error message.
CanteraError()
Protected default constructor discourages throwing errors containing no information.
void clear_FENV()
Clear all the flags for floating-point exceptions.
virtual std::string getMessage() const
Method overridden by derived classes to format the error message.
virtual std::string getClass() const
Method overridden by derived classes to indicate their type.
static Application * Instance()
Return a pointer to the one and only instance of class Application.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
void save()
Function to put this error onto Cantera's error stack.