Utility class for printing error data - used in Mesquite tests. More...
#include <MsqError.hpp>
Public Member Functions | |
MsqPrintError (msq_stdio::ostream &stream) | |
Initialize with ostream to print error data to. More... | |
virtual | ~MsqPrintError () |
On destruction, conditionally prints error data. More... | |
MsqPrintError (msq_stdio::ostream &stream) | |
Initialize with ostream to print error data to. More... | |
virtual | ~MsqPrintError () |
On destruction, conditionally prints error data. More... | |
Public Member Functions inherited from MsqError | |
void | clear () |
resets error object to non-active state (no error). More... | |
bool | error () const |
Check if an error has occured. More... | |
operator bool () const | |
Check if an error has occured. More... | |
MsqError () | |
Initialize to cleared state. More... | |
virtual | ~MsqError () |
Destructor - empty but must declar virtual destrucor if virtual functions. More... | |
ErrorCode | error_code () const |
Get error code. More... | |
const char * | error_message () const |
Get error message. More... | |
const StackTrace & | stack () const |
Get stack trace. More... | |
virtual bool | push (const char *function, const char *file, int line) |
Add to back-trace of call stack. More... | |
virtual bool | set_error (ErrorCode num, const char *msg=0) |
Initialize the error object with the passed data. More... | |
void | clear () |
resets error object to non-active state (no error). More... | |
bool | error () const |
Check if an error has occured. More... | |
operator bool () const | |
Check if an error has occured. More... | |
MsqError () | |
Initialize to cleared state. More... | |
virtual | ~MsqError () |
Destructor - empty but must declar virtual destrucor if virtual functions. More... | |
ErrorCode | error_code () const |
Get error code. More... | |
const char * | error_message () const |
Get error message. More... | |
const StackTrace & | stack () const |
Get stack trace. More... | |
virtual bool | push (const char *function, const char *file, int line) |
Add to back-trace of call stack. More... | |
virtual bool | set_error (ErrorCode num, const char *msg=0) |
Initialize the error object with the passed data. More... | |
Private Attributes | |
msq_std::ostream & | outputStream |
Utility class for printing error data - used in Mesquite tests.
A subclass of MsqError. Behaves the same as MsqError, except that it will automatically print itself to the specified ostream upon destruction if an error occured. For objections of this type declared on the stack (not new'd), this means that the error will be printed when the function returns (if an error occured.)
Definition at line 241 of file includeLinks/MsqError.hpp.
|
inline |
Initialize with ostream to print error data to.
Definition at line 245 of file includeLinks/MsqError.hpp.
|
virtual |
On destruction, conditionally prints error data.
Definition at line 181 of file Misc/MsqError.cpp.
References MsqError::error().
|
inline |
Initialize with ostream to print error data to.
Definition at line 245 of file src/Misc/MsqError.hpp.
|
virtual |
On destruction, conditionally prints error data.
|
private |
Definition at line 253 of file includeLinks/MsqError.hpp.