Commit | Line | Data |
---|---|---|
af070d99 TC |
1 | #ifndef IMAGER_IMERROR_H |
2 | #define IMAGER_IMERROR_H | |
3 | ||
4 | /* error handling | |
5 | see error.c for documentation | |
6 | the error information is currently global | |
7 | */ | |
af070d99 TC |
8 | typedef void (*i_error_cb)(int code, char const *msg); |
9 | typedef void (*i_failed_cb)(i_errmsg *msgs); | |
10 | extern i_error_cb i_set_error_cb(i_error_cb); | |
11 | extern i_failed_cb i_set_failed_cb(i_failed_cb); | |
12 | extern void i_set_argv0(char const *); | |
13 | extern int i_set_errors_fatal(int new_fatal); | |
8b30e240 | 14 | extern i_errmsg *im_errors(pIMCTX); |
af070d99 | 15 | |
696cb85d | 16 | extern void im_push_error(pIMCTX, int code, char const *msg); |
feec0f9c | 17 | #ifndef IMAGER_NO_CONTEXT |
8d14daab | 18 | extern void i_push_errorf(int code, char const *fmt, ...) I_FORMAT_ATTR(2, 3); |
feec0f9c | 19 | #endif |
696cb85d | 20 | extern void im_push_errorf(pIMCTX, int code, char const *fmt, ...) I_FORMAT_ATTR(3, 4); |
44d86483 | 21 | extern void im_push_errorvf(im_context_t ctx, int code, char const *fmt, va_list); |
696cb85d | 22 | extern void im_clear_error(pIMCTX); |
af070d99 TC |
23 | extern int i_failed(int code, char const *msg); |
24 | ||
25 | #endif |