Cantera
3.0.0
|
Logger that doesn't exit when an error is thrown. More...
#include <NoExitLogger.h>
Logger that doesn't exit when an error is thrown.
Definition at line 14 of file NoExitLogger.h.
Public Member Functions | |
void | error (const string &msg) override |
Write an error message and quit. | |
Public Member Functions inherited from Logger | |
Logger () | |
Constructor - empty. | |
virtual | ~Logger () |
Destructor - empty. | |
virtual void | write (const string &msg) |
Write a log message. | |
virtual void | writeendl () |
Write an end of line character and flush output. | |
virtual void | warn (const string &warning, const string &msg) |
Write a warning message. | |
virtual void | error (const string &msg) |
Write an error message and quit. | |
|
inline |
Definition at line 16 of file NoExitLogger.h.
|
inlineoverridevirtual |
Write an error message and quit.
The default behavior is to write to the standard error stream, and then call exit(). Note that no end-of-line character is appended to the message, and so if one is desired it must be included in the string. Note that this default behavior will terminate the application Cantera is invoked from (MATLAB, Excel, etc.) If this is not desired, then derive a class and reimplement this method.
msg | Error message to be written to cerr. |
Reimplemented from Logger.
Definition at line 18 of file NoExitLogger.h.