#include <error.h>

printf:
if(error) throw Error("my message %d %f", 2, 2.5f);
or:
To embed the message with __FILE__,__LINE__ use the "LOCATE" macro
When catching and printing the error message it will output a message similar to:
* error.h:27 * my error *
Also check for OpenGL error with glCheckError(); Bare error class You could use an error message "a la" printf
Public Member Functions | |
| Error (const char *msg,...) | |
| void | tag (const char *msg,...) |
| void | print () const |
Public Attributes | |
| char | msg [1024] |
| error message | |
| Error::Error | ( | const char * | msg, | |
| ... | ||||
| ) | [inline] |
Creates an Error with a message Use a printf-like syntax
| void Error::tag | ( | const char * | msg, | |
| ... | ||||
| ) | [inline] |
Sets an Error message "a la" printf() Adds a line to the error description with a filename/code line
Referenced by LocateError::LocateError().
| void Error::print | ( | ) | const [inline] |
Print the error message on stdout
References msg.
| char Error::msg[1024] |
1.5.5