hp2FEM
0.1
|
Various error-handling functions. More...
#include <GKlib.h>
Defines | |
#define | _GK_ERROR_C_ |
#define | MAX_JBUFS 128 |
Typedefs | |
typedef void(* | gksighandler_t )(int) |
Functions | |
void | gk_set_exit_on_error (int value) |
void | errexit (char *f_str,...) |
void | gk_errexit (int signum, char *f_str,...) |
int | gk_sigtrap () |
int | gk_siguntrap () |
void | gk_sigthrow (int signum) |
void | gk_SetSignalHandlers () |
void | gk_UnsetSignalHandlers () |
void | gk_NonLocalExit_Handler (int signum) |
char * | gk_strerror (int errnum) |
Thread-safe implementation of strerror() | |
void | PrintBackTrace () |
Variables | |
__thread int | gk_cur_jbufs = -1 |
__thread jmp_buf | gk_jbufs [MAX_JBUFS] |
__thread jmp_buf | gk_jbuf |
Various error-handling functions.
This file contains functions dealing with error reporting and termination
$Id: error.c 10644 2011-07-28 16:43:07Z benjamin $
#define _GK_ERROR_C_ |
/* this is needed to properly declare the gk_jub* variables as an extern function in GKlib.h */
void errexit | ( | char * | f_str, |
... | |||
) |
This function prints an error message and exits
void gk_errexit | ( | int | signum, |
char * | f_str, | ||
... | |||
) |
This function prints an error message and raises a signum signal
void gk_set_exit_on_error | ( | int | value | ) |
This function sets the gk_exit_on_error variable
void gk_sigthrow | ( | int | signum | ) |
This function is the custome signal handler, which all it does is to perform a longjump to the most recent saved environment
int gk_sigtrap | ( | ) |
This function sets a number of signal handlers and sets the return point of a longjmp
int gk_siguntrap | ( | ) |
This function sets the handlers for the signals to their default handlers