bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
err.h
1/*
2 * FILENAME: err.h
3 *
4 * PURPOSE: contains error defined constants and prototypes for error.c
5 *
6 * CAVEAT:
7 * No claims are made as to the suitability of the accompanying
8 * source code for any purpose. Although this source code has been
9 * used by the NOAA, no warranty, expressed or implied, is made by
10 * NOAA or the United States Government as to the accuracy and
11 * functioning of this source code, nor shall the fact of distribution
12 * constitute any such endorsement, and no responsibility is assumed
13 * by NOAA in connection therewith. The source code contained
14 * within was developed by an agency of the U.S. Government.
15 * NOAA's National Geophysical Data Center has no objection to the
16 * use of this source code for any purpose since it is not subject to
17 * copyright protection in the U.S. If this source code is incorporated
18 * into other software, a statement identifying this source code may be
19 * required under 17 U.S.C. 403 to appear with any copyright notice.
20 */
21
22
23/* Avoid multiple includes */
24#ifndef ERR_H__
25#define ERR_H__
26
27#include <errno.h>
28
29/* General Errors */
30
31#define ERR_GENERAL 500
32#define ERR_OPEN_FILE 501
33#define ERR_READ_FILE 502
34#define ERR_WRITE_FILE 503
35#define ERR_PTR_DEF 504 /* for menu library */
36#define ERR_MEM_LACK 505
37#define ERR_UNKNOWN 506 /* for menu library */
38#define ERR_FIND_FILE 507
39#define ERR_FILE_DEFINED 508
40#define ERR_OUT_OF_RANGE 510
41#define ERR_PROCESS_DATA 515
42#define ERR_NUM_TOKENS 519
43#define ERR_FILE_EXISTS 522
44#define ERR_CREATE_FILE 523
45#define ERR_WILL_OVERWRITE_FILE 524
46#define ERR_REMOVE_FILE 525
47#define ERR_WONT_OVERWRITE_FILE 526
48
49
50/* Freeform Errors */
51#define ERR_UNKNOWN_VAR_TYPE 1000
52#define ERR_UNKNOWN_PARAMETER 1001
53#define ERR_CONVERT 1003
54#define ERR_MAKE_FORM 1004
55#define ERR_NO_VARIABLES 1012
56
57#define ERR_FIND_FORM 1021
58#define ERR_CONVERT_VAR 1022
59#define ERR_ORPHAN_VAR 1023
60#define ERR_POSSIBLE 1024
61
62/* Binview Errors */
63
64#define ERR_SET_DBIN 1509
65#define ERR_PARTIAL_RECORD 1517
66#define ERR_NT_DEFINE 1520
67#define ERR_UNKNOWN_FORMAT_TYPE 1525
68
69#define ERR_EQN_SET 2000
70
71#define ERR_SDTS 2500
72#define ERR_SDTS_BYE_ATTR 2501
73
74/* String database and menu systems */
75
76#define ERR_MAKE_MENU_DBASE 3000
77#define ERR_NO_SUCH_SECTION 3001
78#define ERR_GETTING_SECTION 3002
79#define ERR_MENU 3003
80
81#define ERR_MN_BUFFER_TRUNCATED 3500
82#define ERR_MN_SEC_NFOUND 3501
83#define ERR_MN_FILE_CORRUPT 3502
84#define ERR_MN_REF_FILE_NFOUND 3503
85
86/* Parameters and parsing */
87
88#define ERR_MISSING_TOKEN 4001
89#define ERR_PARAM_VALUE 4006
90#define ERR_UNKNOWN_OPTION 4013
91#define ERR_IGNORED_OPTION 4014
92#define ERR_VARIABLE_DESC 4015
93#define ERR_VARIABLE_SIZE 4016
94#define ERR_NO_EOL 4017
95
96/* ADTLIB errors */
97
98#define ERR_FIND_MAX_MIN 6001
99#define ERR_PARSE_EQN 6002
100#define ERR_EE_VAR_NFOUND 6003
101#define ERR_CHAR_IN_EE 6004
102#define ERR_EE_DATA_TYPE 6005
103#define ERR_NDARRAY 6006
104#define ERR_GEN_QUERY 6007
105
106/* NAME_TABLE errors */
107
108#define ERR_EXPECTING_SECTION_START 7001
109#define ERR_EXPECTING_SECTION_END 7002
110#define ERR_MISPLACED_SECTION_START 7003
111#define ERR_MISPLACED_SECTION_END 7004
112#define ERR_NT_MERGE 7005
113#define ERR_NT_KEYNOTDEF 7006
114#define ERR_EQV_CONTEXT 7007
115
116/* FreeForm ND errors */
117#define ERR_GEN_ARRAY 7501
118
119/* internal messaging errors */
120
121#define ERR_API 7900
122#define ERR_SWITCH_DEFAULT 7901
123#define ERR_ASSERT_FAILURE 7902
124#define ERR_NO_NAME_TABLE 7903
125#define ERR_API_BUF_LOCKED 7904
126#define ERR_API_BUF_NOT_LOCKED 7905
127
128/* Do NOT create any error codes that exceed those below */
129
130#define ERR_WARNING_ONLY 16000 /* Don't change this number either */
131
132typedef int ERR_BOOLEAN;
133
134#ifdef TRUE /* CodeWarrior for Mac is picky about this -rf01 */
135#undef TRUE
136#endif /* end #ifdef TRUE -rf01 */
137#define TRUE 1
138#ifdef FALSE /* CodeWarrior for Mac is picky about this -rf01 */
139#undef FALSE
140#endif /* end #ifdef FALSE -rf01 */
141#define FALSE 0
142
143int err_count(void);
144int err_pop(void);
145void err_clear(void);
146int err_disp(FF_STD_ARGS_PTR std_args);
147void err_end(void);
148
149int err_push(const int, const char *, ...);
150int verr_push(const int ercode, const char *format, va_list va_args);
151
152ERR_BOOLEAN err_state(void);
153
154#endif /* (NOT) ERR_H__ */