Cantera
2.2.1
|
Class to carry out messages. More...
#include <application.h>
Public Member Functions | |
Messages () | |
Constructor for the Messages class. More... | |
Messages (const Messages &r) | |
Messages & | operator= (const Messages &r) |
void | addError (const std::string &r, const std::string &msg) |
Set an error condition in the application class without throwing an exception. More... | |
int | getErrorCount () |
Return the number of errors that have been encountered so far. More... | |
void | popError () |
Discard the last error message. More... | |
std::string | lastErrorMessage () |
Retrieve the last error message in a string. More... | |
void | getErrors (std::ostream &f) |
Prints all of the error messages to an ostream. More... | |
void | logErrors () |
Prints all of the error messages using writelog. More... | |
void | writelog (const std::string &msg) |
Write a message to the screen. More... | |
void | writelogendl () |
Write an end of line character to the screen and flush output. More... | |
void | logerror (const std::string &msg) |
Write an error message and quit. More... | |
void | setLogger (Logger *logwriter) |
Install a logger. More... | |
Protected Attributes | |
std::vector< std::string > | errorMessage |
Current list of error messages. More... | |
std::vector< std::string > | errorRoutine |
Current error Routine. More... | |
Logger * | logwriter |
Current pointer to the logwriter. More... | |
Class to carry out messages.
Definition at line 44 of file application.h.
Messages | ( | ) |
Constructor for the Messages class.
Constructor for the Messages class which is a subclass of the Application class.
Definition at line 69 of file application.cpp.
References Application::Messages::logwriter.
void writelogendl | ( | ) |
Write an end of line character to the screen and flush output.
Definition at line 137 of file application.cpp.
Referenced by Application::writelogendl().
void logerror | ( | const std::string & | msg | ) |
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. |
Definition at line 126 of file application.cpp.
References Cantera::warn_deprecated().
Referenced by Application::logerror().
|
protected |
Current list of error messages.
Definition at line 164 of file application.h.
Referenced by Application::Messages::popError().
|
protected |
Current error Routine.
Definition at line 167 of file application.h.
Referenced by Application::Messages::popError().
|
protected |
Current pointer to the logwriter.
Definition at line 170 of file application.h.
Referenced by Application::Messages::Messages().