22#ifndef LIBDPKG_EHANDLE_H
23#define LIBDPKG_EHANDLE_H
55 const void *printer_data);
58 const void *printer_data);
63 void (*f2)(
int argc,
void **argv),
int flagmask2,
64 unsigned int nargs, ...);
65void push_cleanup(
void (*call)(
int argc,
void **argv),
int flagmask,
66 unsigned int nargs, ...);
78#define internerr(...) do_internerr(__FILE__, __LINE__, __func__, __VA_ARGS__)
void * args[20]
Definition ehandle.c:89
void push_error_context_func(error_handler_func *handler, error_printer_func *printer, const void *printer_data)
Definition ehandle.c:219
void push_error_context(void)
Definition ehandle.c:245
void error_printer_func(const char *emsg, const void *data)
Definition ehandle.h:48
void ohshite(const char *fmt,...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1)
Definition ehandle.c:469
void catch_fatal_error(void)
Default fatal error handler.
Definition ehandle.c:111
void push_checkpoint(int mask, int value)
Push an error cleanup checkpoint.
Definition ehandle.c:312
void push_cleanup_fallback(void(*f1)(int argc, void **argv), int flagmask1, void(*f2)(int argc, void **argv), int flagmask2, unsigned int nargs,...)
Definition ehandle.c:379
void ohshit(const char *fmt,...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1)
Definition ehandle.c:451
void push_error_context_jump(jmp_buf *jumper, error_printer_func *printer, const void *printer_data)
Definition ehandle.c:232
void print_fatal_error(const char *emsg, const void *data)
Definition ehandle.c:118
void pop_cleanup(int flagset)
Definition ehandle.c:390
volatile int onerr_abort
Definition ehandle.c:41
void ohshitv(const char *fmt, va_list args) DPKG_ATTR_NORET DPKG_ATTR_VPRINTF(1)
Definition ehandle.c:462
void do_internerr(const char *file, int line, const char *func, const char *fmt,...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(4)
Definition ehandle.c:495
void push_cleanup(void(*call)(int argc, void **argv), int flagmask, unsigned int nargs,...)
Definition ehandle.c:368
void error_handler_func(void)
Definition ehandle.h:47
void pop_error_context(int flagset)
Unwind the current error context by running its registered cleanups.
Definition ehandle.c:407
@ ehflag_normaltidy
Definition ehandle.h:42
@ ehflag_bombout
Definition ehandle.h:43
@ ehflag_recursiveerror
Definition ehandle.h:44
#define DPKG_BEGIN_DECLS
Definition macros.h:164
#define DPKG_ATTR_VPRINTF(n)
Definition macros.h:118
#define DPKG_ATTR_PRINTF(n)
Definition macros.h:117
#define DPKG_END_DECLS
Definition macros.h:165
#define DPKG_ATTR_NORET
Definition macros.h:108
#define DPKG_BIT(n)
Return the integer value of bit n.
Definition macros.h:203