27#ifndef PED_EXCEPTION_H_INCLUDED
28#define PED_EXCEPTION_H_INCLUDED
71#define PED_EXCEPTION_OPTION_FIRST PED_EXCEPTION_FIX
72#define PED_EXCEPTION_OPTION_LAST PED_EXCEPTION_CANCEL
94#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
100#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
108#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
void ped_exception_set_handler(PedExceptionHandler *handler)
Set the exception handler.
Definition: exception.c:166
PedExceptionOption ped_exception_throw(PedExceptionType ex_type, PedExceptionOption ex_opt, const char *message,...)
Throw an exception.
Definition: exception.c:230
PedExceptionOption ped_exception_rethrow()
Rethrow an unhandled exception.
Definition: exception.c:280
char * ped_exception_get_type_string(PedExceptionType ex_type)
Return a string describing an exception type.
Definition: exception.c:101
PedExceptionOption ped_exception_default_handler(PedException *ex)
PedExceptionOption() PedExceptionHandler(PedException *ex)
Definition: exception.h:88
_PedExceptionType
Exception type.
Definition: exception.h:35
char * ped_exception_get_option_string(PedExceptionOption ex_opt)
Return a string describing an exception option.
Definition: exception.c:124
PedExceptionHandler * ped_exception_get_handler(void)
Get the current exception handler.
Definition: exception.c:178
void ped_exception_leave_all()
Indicates that the calling function does not want to accept any responsibility for exceptions any mor...
Definition: exception.c:307
_PedExceptionOption
Option for resolving the exception.
Definition: exception.h:48
void ped_exception_fetch_all()
Indicates that exceptions should not go to the exception handler, but passed up to the calling functi...
Definition: exception.c:291
enum _PedExceptionType PedExceptionType
Definition: exception.h:43
int ped_exception
Definition: exception.c:70
enum _PedExceptionOption PedExceptionOption
Definition: exception.h:74
void ped_exception_catch()
Assert that the current exception has been resolved.
Definition: exception.c:189
@ PED_EXCEPTION_BUG
Definition: exception.h:40
@ PED_EXCEPTION_INFORMATION
Definition: exception.h:36
@ PED_EXCEPTION_WARNING
Definition: exception.h:37
@ PED_EXCEPTION_NO_FEATURE
Definition: exception.h:41
@ PED_EXCEPTION_FATAL
Definition: exception.h:39
@ PED_EXCEPTION_ERROR
Definition: exception.h:38
@ PED_EXCEPTION_RETRY
Definition: exception.h:55
@ PED_EXCEPTION_RETRY_CANCEL
Definition: exception.h:66
@ PED_EXCEPTION_IGNORE_CANCEL
Definition: exception.h:64
@ PED_EXCEPTION_CANCEL
Definition: exception.h:57
@ PED_EXCEPTION_YES_NO_CANCEL
Definition: exception.h:62
@ PED_EXCEPTION_FIX
Definition: exception.h:51
@ PED_EXCEPTION_NO
Definition: exception.h:53
@ PED_EXCEPTION_OK_CANCEL
Definition: exception.h:60
@ PED_EXCEPTION_RETRY_IGNORE_CANCEL
Definition: exception.h:67
@ PED_EXCEPTION_IGNORE
Definition: exception.h:56
@ PED_EXCEPTION_YES_NO
Definition: exception.h:61
@ PED_EXCEPTION_YES
Definition: exception.h:52
@ PED_EXCEPTION_OK
Definition: exception.h:54
@ PED_EXCEPTION_UNHANDLED
Definition: exception.h:50
#define __attribute(arg)
Definition: parted.h:32
Structure with information about exception.
Definition: exception.h:79
PedExceptionType type
type of exception
Definition: exception.h:81
PedExceptionOption options
ORed list of options that the exception handler can return (the ways an exception can be resolved)
Definition: exception.h:82
char * message
text describing what the event was
Definition: exception.h:80