summaryrefslogtreecommitdiff
path: root/src/include/cctk_WarnLevel.h
blob: a9956e3e0361708593a21ae58aa53217adb2c40d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
 /*@@
   @header    cctk_WarnLevel.h
   @date      Wed Feb 17 00:53:55 1999
   @author    Tom Goodale
   @desc 
   Header for the warning functions.
   @enddesc 
   @version $Header$
 @@*/

#ifndef _CCTK_WARNLEVEL_H_
#define _CCTK_WARNLEVEL_H_

#ifdef CCODE

#ifdef __cplusplus 
extern "C" 
{
#endif

int CCTK_Warn(int level, 
               int line, 
               const char *file, 
               const char *thorn, 
               const char *message);
int CCTK_VWarn(int level, 
                int line, 
                const char *file, 
                const char *thorn, 
                const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 5, 6)))
#endif
;
int CCTK_VParamWarn (const char *thorn,
                     const char *format,
                     ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)))
#endif
;
int CCTK_ParamWarn(const char *thorn, const char *message);
int CCTK_Info(const char *thorn, const char *message);
int CCTK_VInfo(const char *thorn, const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)))
#endif
;

#ifdef __cplusplus 
}
#endif

#endif	/* CCODE */

/* suggested values for warning levels (courtesy of Steve, PR#1742) */
#define CCTK_WARN_ABORT    0	/* abort the Cactus run */
#define CCTK_WARN_ALERT    1	/* the results of this run will be wrong, */
                                /* and this will surprise the user, */
				/* but we can still continue the run */
#define CCTK_WARN_COMPLAIN 2	/* the user should know about this, */
                                /* but the this problem is not terribly */
                                /* surprising */
#define CCTK_WARN_PICKY    3	/* this is for small problems that can */
				/* probably be ignored, but that careful */
				/* people may want to know about */
#define CCTK_WARN_DEBUG    4	/* these messages are probably useful */
				/* only for debugging purposes */

#endif	/* ! _CCTK_WARNLEVEL_H_ */