This repository has been archived on 2024-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
probotic/include/error.h
2023-08-07 08:04:15 -06:00

16 lines
395 B
C

#define ERR(ret,msg) \
do { fputs(PROGN ": " msg "\n", stderr); return (ret); } while (0)
#define ERRFMT(ret,fmt,...) \
do { fprintf(stderr, PROGN ": " fmt "\n", __VA_ARGS__); return (ret); } while (0)
#define PERROR(ret) \
do { perror(PROGN); return (ret); } while (0)
#define ERRMSG(msg) \
fputs(msg "\n", stderr)
#define DB_ERROR 100
#define IRC_ERROR 101
#define CREDS_ERROR 102