30 #ifdef MSQ_USE_OLD_IO_HEADERS
36 #ifdef MSQ_USE_OLD_STD_HEADERS
52 # define MSQ_FUNCTION ""
62 #define MSQ_CHKERR(err) (err.error() && err.push(MSQ_FUNCTION,__FILE__,__LINE__))
68 #define MSQ_ERRRTN(err) if (MSQ_CHKERR(err)) return
72 #define MSQ_ERRZERO(err) if (MSQ_CHKERR(err)) return 0
83 #define MSQ_SETERR(err) \
84 Mesquite::MsqError::setter(err, MSQ_FUNCTION,__FILE__,__LINE__).set
160 msq_std::string
function;
164 Trace(
const char* fun,
const char* fil,
int lin )
185 virtual bool push(
const char*
function,
const char* file,
int line );
200 bool set(
const msq_std::string& message,
ErrorCode num );
203 __attribute__ ((format (printf, 3, 4)))
214 {
return Setter( err,
function, file, line ); }
An I/O error occured (e.g.
unable to allocate the necessary memory
msq_std::ostream & outputStream
msq_std::string errorMessage
Used to hold the error state and return it to the application.
ErrorCode error_code() const
Get error code.
virtual bool push(const char *function, const char *file, int line)
Add to back-trace of call stack.
MsqPrintError(msq_stdio::ostream &stream)
Initialize with ostream to print error data to.
requested functionality is not (yet) implemented
Attempt to create tag that already exists.
virtual bool set_error(ErrorCode num, const char *msg=0)
Initialize the error object with the passed data.
One line of stack trace data.
MsqError()
Initialize to cleared state.
invalid function argument passed
bool error() const
Check if an error has occured.
msq_std::list< Trace > StackTrace
Container type used to store stack trace.
Setter(MsqError &err, const char *function, const char *file, int line)
static Setter setter(MsqError &err, const char *function, const char *file, int line)
Application or user interrupted operation.
const char * error_message() const
Get error message.
File cannot be opened/created.
Specified tag does not exist.
const char * functionName
Utility class for printing error data - used in Mesquite tests.
object is in an invalid state
void clear()
resets error object to non-active state (no error).
virtual ~MsqError()
Destructor - empty but must declar virtual destrucor if virtual functions.
msq_stdio::ostream & operator<<(msq_stdio::ostream &s, const Matrix3D &A)
virtual ~MsqPrintError()
On destruction, conditionally prints error data.
const StackTrace & stack() const
Get stack trace.
no storage mode chosen within PatchData
Error parsing input (or input file)
Trace(const char *fun, const char *fil, int lin)