bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
errormacros.h
1
2#ifndef ERRORMACROS_H
3#define ERRORMACROS_H
4
5#include <stdio.h>
6#define HDFEOS_ERROR_CHECK(msg) \
7if (hdfeos_status_code == FAIL) { \
8fprintf(stderr, "Error: %s at line %d\n", msg, __LINE__); \
9exit(1); \
10}
11#define MEM_ERROR_CHECK(msg) \
12if (mem_status_code == NULL) { \
13fprintf(stderr, "Error: %s at line %d\n", msg, __LINE__); \
14exit(1); \
15}
16#define ERROR(msg) \
17{ \
18fprintf(stderr, "Error: %s at line %d\n", msg, __LINE__); \
19exit(1); \
20}
21#ifdef MISRWARN
22#define WRN_LOG_JUMP(msg) \
23{ \
24fprintf(stderr,"Warning: %s in %s <Line: %d>\n", \
25msg, FUNC_NAMEm, __LINE__); \
26goto ERROR_HANDLE; \
27}
28#else
29#define WRN_LOG_JUMP(msg) goto ERROR_HANDLE;
30#endif
31#endif /* ERRORMACROS_H */