HNBody  Version 1.0.10
errors.h
Go to the documentation of this file.
1 #ifndef HNBODY_ERRORS_H
2 #define HNBODY_ERRORS_H
3 
13 #include <errno.h>
14 #include <float.h>
15 #include <limits.h>
16 
17 #include <mutils/platform.h>
18 
19 #ifdef __cplusplus
20 extern "C" {
21 namespace HNBODY {
22 #endif
23 
24 
25 DLLSPEC extern void
26  hnb_panic(int err, const char *msg, const char *func, const char *src);
27 
28 #define panic(err, msg, func, src) do { \
29  if (err) hnb_panic(errno, msg, func, src); \
30  } while (0)
31 
32 #define panicn(err, msg, func, src) do { \
33  int error=err; \
34  if (error) hnb_panic(error, msg, func, src); \
35  } while (0)
36 
37 
38 static const double invalid_dbl = -21.12e-300;
39 static const int invalid_int = INT_MIN+1984;
40 
41 
42 #ifdef __cplusplus
43 } // namespace HNBODY
44 } // extern "C"
45 #endif
46 
47 #endif /* HNBODY_ERRORS_H */
MathUtils platform identification macros.