17 static const char* stars =
"***********************************************************************\n";
20 procedure_(procedure),
27 warn_deprecated(
"CanteraError::save",
"To be removed after Cantera 2.3.");
61 return fmt::format(
"Array size ({}) too small. Must be at least {}.",
67 return fmt::format(
"IndexError: {}[{}] outside valid range of 0 to {}.",
68 arrayName_, m_, mmax_);
std::string formattedMessage_
Formatted message returned by what()
bool saved_
Exception has already been saved to Cantera's error stack.
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.
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
This file contains definitions for utility functions and text for modules, inputfiles, logs, textlogs, (see Input File Handling, Diagnostic Output, and Writing messages to the screen).
virtual std::string getMessage() const
Method overridden by derived classes to format the error message.
virtual std::string getMessage() const
Method overridden by derived classes to format the error message.
std::string procedure_
The name of the procedure where the exception occurred.
CanteraError()
Protected default constructor discourages throwing errors containing no information.
static Application * Instance()
Return a pointer to the one and only instance of class Application.
void addError(const std::string &r, const std::string &msg="")
Set an error condition in the application class without throwing an exception.
Namespace for the Cantera kernel.
virtual std::string getClass() const
Method overridden by derived classes to indicate their type.
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.