00001 #ifndef HNBODY_ERRORS_H
00002 #define HNBODY_ERRORS_H
00003
00013 #include <errno.h>
00014 #include <float.h>
00015 #include <limits.h>
00016
00017 #include <mutils/platform.h>
00018
00019 #ifdef __cplusplus
00020 extern "C" {
00021 namespace HNBODY {
00022 #endif
00023
00024
00025 DLLSPEC extern void
00026 hnb_panic(int err, const char *msg, const char *func, const char *src);
00027
00028 #define panic(err, msg, func, src) do { \
00029 if (err) hnb_panic(errno, msg, func, src); \
00030 } while (0)
00031
00032 #define panicn(err, msg, func, src) do { \
00033 int error=err; \
00034 if (error) hnb_panic(error, msg, func, src); \
00035 } while (0)
00036
00037
00038 static const double invalid_dbl = -21.12e-300;
00039 static const int invalid_int = INT_MIN+1984;
00040
00041
00042 #ifdef __cplusplus
00043 }
00044 }
00045 #endif
00046
00047 #endif