]>
jfr.im git - irc/quakenet/newserv.git/blob - core/error.h
6 * Error flagging routines
9 /* SEVERITY GUIDELINES:
11 * ERR_STOP: Something so bad has happened that the whole service must
12 * stop. Something like a malloc() error or similar magnitude
15 * ERR_FATAL: Something so bad has happened that the module cannot usefully
16 * function any more, but won't necessarily prevent other modules
19 * ERR_ERROR: Something is wrong, perhaps a data structure is inconsistent
20 * or something similar has gone wrong internally. This might
21 * indicate a larger problem but the module can continue working
24 * ERR_WARNING: Something slightly out of the ordinary has happened (e.g.
25 * the IRCD sent a bogus message). The module can continue
26 * working though without serious harm.
28 * ERR_INFO: Not an error condition. Something noteworthy has happened,
29 * like a major module has started up. These will typically be
30 * seen all the time on most setups so try not to be too spammy.
32 * ERR_DEBUG: Not an error condition. Something less significant has
33 * happened which might be of interest if someone is attempting
34 * to debug a problem. Nevertheless try not to be too spammy.
50 typedef void (*CoreHandlerFn
)(void *arg
);
52 typedef struct corehandler
{
55 struct corehandler
*prev
, *next
;
58 void Error(char *source
, int severity
, char *reason
, ... ) __attribute__ ((format (printf
, 3, 4)));
60 corehandler
*registercorehandler(CoreHandlerFn fn
, void *arg
);
61 void deregistercorehandler(corehandler
*c
);