Public Member Functions | Static Public Member Functions | List of all members
o2scl::err_hnd_type Class Referenceabstract

Class defining an error handler [abstract base]. More...

#include <err_hnd.h>

Inheritance diagram for o2scl::err_hnd_type:
o2scl::err_hnd_gsl o2scl::err_hnd_cpp

Public Member Functions

virtual void set (const char *reason, const char *file, int line, int lerrno)=0
 Set an error.
 
virtual void get (const char *&reason, const char *&file, int &line, int &lerrno)=0
 Get the last error.
 
virtual int get_errno () const =0
 Return the last error number.
 
virtual int get_line () const =0
 Return the line number of the last error.
 
virtual const char * get_reason () const =0
 Return the reason for the last error.
 
virtual const char * get_file () const =0
 Return the file name of the last error.
 
virtual const char * get_str ()=0
 Return a string summarizing the last error.
 
virtual void reset ()=0
 Remove last error information.
 
virtual const char * type () const =0
 Return type.
 

Static Public Member Functions

static void gsl_hnd (const char *reason, const char *file, int line, int lerrno)
 Set an error. More...
 

Detailed Description

A global object of this type is defined, err_hnd .

Idea for Future:
There may be an issue associated with the string manipulations causing errors in the error handler.

Definition at line 142 of file err_hnd.h.

Member Function Documentation

◆ gsl_hnd()

static void o2scl::err_hnd_type::gsl_hnd ( const char *  reason,
const char *  file,
int  line,
int  lerrno 
)
inlinestatic

This is separate from set(), since the gsl error handler needs to be a static function.

Definition at line 155 of file err_hnd.h.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).