Class err_hnd_gsl (o2scl)¶
-
class
o2scl
::
err_hnd_gsl
: public o2scl::err_hnd_type¶ The error handler.
An error handler for use in which replaces the GSL error handler
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.
Subclassed by o2scl::err_hnd_cpp
Public Functions
-
err_hnd_gsl
()¶
-
~err_hnd_gsl
()¶
-
void
set
(const char *reason, const char *file, int line, int lerrno)¶ Set an error.
-
void
get
(const char *&reason, const char *&file, int &line, int &lerrno)¶ Get the last error.
-
int
get_errno
() const¶ Return the last error number.
-
int
get_line
() const¶ Return the line number of the last error.
-
const char *
get_reason
() const¶ Return the reason for the last error.
-
const char *
get_file
() const¶ Return the file name of the last error.
-
const char *
get_str
()¶ Return a string summarizing the last error.
-
void
reset
()¶ Remove last error information.
-
const char *
type
() const¶ Return type (“err_hnd_gsl”)
Public Members
-
size_t
fname_size
¶ Number of characters from filename to print (default 28)
Protected Functions
-
std::string
errno_to_string
(int errnox)¶ Convert an error number to a string.
-