yumapro  21.10T-9
YumaPro SDK
status.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4  *
5  * Unless required by applicable law or agreed to in writing,
6  * software distributed under the License is distributed on an
7  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8  * KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations
10  * under the License.
11  */
12 #ifndef _H_status
13 #define _H_status
14 /* FILE: status.h
15 *********************************************************************
16 * *
17 * P U R P O S E *
18 * *
19 *********************************************************************/
20 
26 /*********************************************************************
27 * *
28 * C H A N G E H I S T O R Y *
29 * *
30 *********************************************************************
31 
32 date init comment
33 ----------------------------------------------------------------------
34 03-jan-92 abb move statusT from global.h to here
35 18-apr-96 abb adapted for gr8cgi project
36 */
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /*********************************************************************
43 * *
44 * C O N S T A N T S *
45 * *
46 *********************************************************************/
47 
48 
49 /*
50  * error code definitions--be sure to add any err code
51  * definitions to the copy in err.c to register the errcode name,
52  * the error severity, and the error string
53  */
54 
55 #include "status_enum.h"
56 
57 
92 extern status_t
93  set_error (const char *filename, int linenum,
94  status_t status, int sqlError);
95 
96 
101 extern void
102  print_errors (void);
103 
104 
109 extern void
110  clear_errors (void);
111 
112 
119 extern errtyp_t
120  get_errtyp (status_t res);
121 
122 
129 extern const char *
131 
132 
141 extern status_t
142  errno_to_status (void);
143 
144 
149 extern void
150  status_init (void);
151 
152 
157 extern void
158  status_cleanup (void);
159 
160 
169 extern void
170  print_error_count (void);
171 
172 
178 extern void
179  print_error_messages (void);
180 
181 
188 extern void
190 
191 
195 #ifdef __cplusplus
196 } /* end extern 'C' */
197 #endif
198 
199 #endif /* _H_status */
status_t set_error(const char *filename, int linenum, status_t status, int sqlError)
Generate an internal programming error report.
Definition: status.c:111
void print_lang_error_messages(void)
Print the error number and error message for each error to STDOUT or the logfile; used for error mess...
Definition: status.c:1115
void status_init(void)
Init this module.
Definition: status.c:1017
void print_error_count(void)
Print the error_count field, if it is non-zero to STDOUT or the logfile.
Definition: status.c:1050
void print_error_messages(void)
Print the error number and error message for each error to STDOUT or the logfile. ...
Definition: status.c:1069
void status_cleanup(void)
Cleanup this module.
Definition: status.c:1033
void print_errors(void)
Dump any entries stored in the error_stack.
Definition: status.c:155
errtyp_t
error type
Definition: status_enum.h:169
status_t
global error return code
Definition: status_enum.h:186
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
void clear_errors(void)
Clear the error_stack if it has any errors stored in it.
Definition: status.c:179
status_t errno_to_status(void)
Get the errno variable and convert it to a status_t.
Definition: status.c:968
errtyp_t get_errtyp(status_t res)
Get the error classification for the result code.
Definition: status.c:207
global error status code enumerations