]>
jfr.im git - irc/quakenet/newserv.git/blob - core/error.c
10 char *sevtostring(int severity
) {
28 return "terminal error";
31 return "unknown error";
35 void Error(char *source
, int severity
, char *reason
, ... ) {
43 vsnprintf(buf
,512,reason
,va
);
46 if (severity
>ERR_DEBUG
) {
49 strftime(timebuf
,100,"%Y-%m-%d %H:%M:%S",tm
);
50 fprintf(stderr
,"[%s] %s(%s): %s\n",timebuf
,sevtostring(severity
),source
,buf
);
53 if (severity
>=ERR_STOP
) {
54 fprintf(stderr
,"Terminal error occured, exiting...\n");
55 triggerhook(HOOK_CORE_STOPERROR
, NULL
);