MISR Toolkit  1.5.1
errormacros.h
Go to the documentation of this file.
1 #ifndef ERRORMACROS_H
2 #define ERRORMACROS_H
3 
4 #include <stdio.h>
5 
6 #define HDFEOS_ERROR_CHECK(msg) \
7  if (hdfeos_status_code == FAIL) { \
8  fprintf(stderr, "Error: %s at line %d\n", msg, __LINE__); \
9  exit(1); \
10  }
11 
12 #define MEM_ERROR_CHECK(msg) \
13  if (mem_status_code == NULL) { \
14  fprintf(stderr, "Error: %s at line %d\n", msg, __LINE__); \
15  exit(1); \
16  }
17 
18 #define MTK_ERROR(msg) \
19  { \
20  fprintf(stderr, "Error: %s at line %d\n", msg, __LINE__); \
21  exit(1); \
22  }
23 
24 #ifdef MISRWARN
25  #define WRN_LOG_JUMP(msg) \
26  { \
27  fprintf(stderr,"Warning: %s in %s <Line: %d>\n", \
28  msg, FUNC_NAMEm, __LINE__); \
29  goto ERROR_HANDLE; \
30  }
31 #else
32  #define WRN_LOG_JUMP(msg) goto ERROR_HANDLE;
33 #endif
34 
35 #endif /* ERRORMACROS_H */

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:51