15 #include "serialbox-c/Api.h" 17 #ifndef SERIALBOX_C_ERRORHANDLING_H 18 #define SERIALBOX_C_ERRORHANDLING_H SERIALBOX_API void serialboxResetFatalErrorHandler(void)
Reset the fatal error handler.
SERIALBOX_API int serialboxStateErrorHandlerHasError(void)
Check the current error state.
SERIALBOX_API char * serialboxStateErrorHandlerGetErrorMessage(void)
Query the current error state.
SERIALBOX_API void serialboxInstallFatalErrorHandler(serialboxFatalErrorHandler_t handler)
Install a fatal error handler.
SERIALBOX_API void serialboxStateErrorHandler(const char *reason)
Store the the current state of the error which can be queried via serialboxStateErrorHandlerGetLastEr...
SERIALBOX_API void serialboxStateErrorHandlerResetState(void)
Reset the current error state.
SERIALBOX_API void serialboxFatalError(const char *reason)
Report a fatal error.
void serialboxDefaultFatalErrorHandler(const char *reason)
Emit the last error string to stderr and call exit(1)
SERIALBOX_API typedef void(* serialboxFatalErrorHandler_t)(const char *reason)
Error handler callback.