#include <err_hnd.h>
Note that the string arguments to set() can refer to temporary storage, since they are copied when the function is called and an error is set.
Definition at line 203 of file err_hnd.h.
Public Member Functions | |
virtual void | set (const char *reason, const char *file, int line, int lerrno) |
Set an error. | |
virtual void | get (const char *&reason, const char *&file, int &line, int &lerrno) |
Get the last error. | |
virtual int | get_errno () const |
Return the last error number. | |
virtual int | get_line () const |
Return the line number of the last error. | |
virtual const char * | get_reason () const |
Return the reason for the last error. | |
virtual const char * | get_file () const |
Return the file name of the last error. | |
virtual const char * | get_str () |
Return a string summarizing the last error. | |
virtual void | reset () |
Remove last error information. | |
void | set_mode (int m) |
Set error handling mode. | |
int | get_mode () const |
Return the error handling mode. | |
virtual const char * | type () const |
Return type ("err_hnd_gsl"). | |
Data Fields | |
bool | array_abort |
If true, call exit() when an array index error is set (default true). | |
size_t | fname_size |
Number of characters from filename to print (default 35). | |
Protected Member Functions | |
std::string | errno_to_string (int errnox) |
Convert an error number to a string. | |
Protected Attributes | |
int | a_errno |
The error number. | |
int | a_line |
The line number. | |
int | mode |
The mode of error handling (default 2). | |
char * | a_file |
The filename. | |
char | a_reason [rsize] |
The error explanation. | |
char | fullstr [fsize] |
A full string with explanation and line and file info. | |
Static Protected Attributes | |
static const int | rsize = 300 |
The maximum size of error explanations. | |
static const int | fsize = 400 |
The maximum size of error explanations with the line and file info. |
void set_mode | ( | int | m | ) | [inline] |
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page