libhasha 2.2.2
Loading...
Searching...
No Matches
error.h File Reference
#include "./internal.h"
Include dependency graph for error.h:

Go to the source code of this file.

Macros

#define ha_curpos   __func__, __LINE__
#define ha_assert(cond, message, ...)

Functions

HA_PUBFUN void ha_throw (int noabort, int notime, const char *func, size_t line, char *level, char *fmt,...)
HA_PUBFUN void ha_throwd (int debug, int noabort, int notime, const char *func, size_t line, char *level, char *fmt,...)
HA_PUBFUN void ha_throw_fatal (int notime, const char *func, size_t line, char *fmt,...)
HA_PUBFUN void ha_throw_error (int notime, const char *func, size_t line, char *fmt,...)
HA_PUBFUN void ha_throw_warn (int notime, const char *func, size_t line, char *fmt,...)
HA_PUBFUN void ha_throw_debug (int notime, const char *func, size_t line, char *fmt,...)

Macro Definition Documentation

◆ ha_assert

#define ha_assert ( cond,
message,
... )
Value:
if (!(cond)) \
{ \
ha_throw_error(0, ha_curpos, "assertion " #cond " failed: " message, \
#__VA_ARGS__); \
}
#define ha_curpos
Definition error.h:36

Definition at line 37 of file error.h.

37#define ha_assert(cond, message, ...) \
38 if (!(cond)) \
39 { \
40 ha_throw_error(0, ha_curpos, "assertion " #cond " failed: " message, \
41 #__VA_ARGS__); \
42 }

◆ ha_curpos

#define ha_curpos   __func__, __LINE__

Definition at line 36 of file error.h.

Function Documentation

◆ ha_throw()

HA_PUBFUN void ha_throw ( int noabort,
int notime,
const char * func,
size_t line,
char * level,
char * fmt,
... )

◆ ha_throw_debug()

HA_PUBFUN void ha_throw_debug ( int notime,
const char * func,
size_t line,
char * fmt,
... )

◆ ha_throw_error()

HA_PUBFUN void ha_throw_error ( int notime,
const char * func,
size_t line,
char * fmt,
... )

◆ ha_throw_fatal()

HA_PUBFUN void ha_throw_fatal ( int notime,
const char * func,
size_t line,
char * fmt,
... )

◆ ha_throw_warn()

HA_PUBFUN void ha_throw_warn ( int notime,
const char * func,
size_t line,
char * fmt,
... )

◆ ha_throwd()

HA_PUBFUN void ha_throwd ( int debug,
int noabort,
int notime,
const char * func,
size_t line,
char * level,
char * fmt,
... )