Replace all CROAK calls with assert or LOG_FATAL

Remove croak() and use assert() or LOG_FATAL() everywhere. Hopefully
the problems with debugging mentioned in the croak() comment are long gone.
This commit is contained in:
Miroslav Lichvar
2010-08-12 14:30:05 +02:00
parent 2a64b75893
commit 6b0198c2d7
13 changed files with 105 additions and 195 deletions

View File

@@ -63,6 +63,7 @@ typedef enum {
LOGF_Regress,
LOGF_Sys,
LOGF_SysLinux,
LOGF_SysNetBSD,
LOGF_SysSolaris,
LOGF_SysSunOS,
LOGF_SysWinnt,
@@ -100,15 +101,6 @@ extern int LOG_RateLimited(void);
#define LOG_FATAL LOG_Position(__FILE__, __LINE__, ""); LOG_Fatal_Function
#endif /* defined (__GNUC__) */
/* Like assert(0) */
#if defined(LINUX) && defined(__alpha__)
#define CROAK(message) assert(0) /* Added JGH Feb 24 2001 FIXME */
#else
extern int croak(const char *file, int line, const char *msg);
#define CROAK(message) croak(__FILE__, __LINE__, message);
#endif
/* File logging functions */
typedef int LOG_FileID;