#include <error.h>
Public Member Functions | |
Error (const char *s) | |
void | warning (const char *msg=0) |
void | nonfatal (const char *msg=0) |
void | fatal (const char *=0) |
void | memory (const void *=0) |
This class prints error messages in a standard way.
PLib::Error::Error | ( | const char * | title | ) |
constructor Description:
title | the title of the routine where the error occurs |
void PLib::Error::warning | ( | const char * | msg = 0 |
) |
reports a warning error message The usual call to this function is made through the $$ operator, {i.e.} {verbatim} Error error("routine name") ; error << "An error occured " ; error.warning() ; {verbatim}
msg | the message to report |
void PLib::Error::fatal | ( | const char * | msg = 0 |
) |
reports a fatal error Reports a fatal error. If the .DEBUG_MATRIX. flag has been set then the routine starts an infinte loop. An exit(1) is executed otherwise.
The usual call to this function is made through the $$ operator, {i.e.} {verbatim} Error error("routine name") ; error << "A fatal error occured " ; error.fatal() ; {verbatim}
msg | a message to report |
void PLib::Error::memory | ( | const void * | p = 0 |
) |
reports a memory allocation error Reports a memory allocation error. If the DEBUG_PLIB flag has been set then the routine starts an infinte loop. An exit(1) is executed otherwise.
The usual call to this function is made through the operator>> , {i.e.} {verbatim} Error error("variable name") ; float* var = new float[bigSize] ; error.memory(var) ; {verbatim}
p | the pointer to test |