yumapro  23.10T-9
YumaPro SDK
Loading...
Searching...
No Matches
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
32date init comment
33----------------------------------------------------------------------
3403-jan-92 abb move statusT from global.h to here
3518-apr-96 abb adapted for gr8cgi project
36*/
37
38#ifdef __cplusplus
39extern "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
95extern status_t
96 set_error (const char *filename, int linenum,
97 status_t status, int sqlError);
98
99
104extern void
105 print_errors (void);
106
107
112extern void
113 clear_errors (void);
114
115
122extern errtyp_t
123 get_errtyp (status_t res);
124
125
132extern const char *
134
135
144extern status_t
145 errno_to_status (void);
146
147
152extern void
153 status_init (void);
154
155
160extern void
161 status_cleanup (void);
162
163
172extern void
173 print_error_count (void);
174
175
181extern void
183
184
191extern void
193
194
198#ifdef __cplusplus
199} /* end extern 'C' */
200#endif
201
202#endif /* _H_status */
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:243
status_t errno_to_status(void)
Get the errno variable and convert it to a status_t.
Definition: status.c:977
void print_error_messages(void)
Print the error number and error message for each error to STDOUT or the logfile.
Definition: status.c:1078
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:1124
void status_cleanup(void)
Cleanup this module.
Definition: status.c:1042
void status_init(void)
Init this module.
Definition: status.c:1026
void clear_errors(void)
Clear the error_stack if it has any errors stored in it.
Definition: status.c:183
void print_errors(void)
Dump any entries stored in the error_stack.
Definition: status.c:159
void print_error_count(void)
Print the error_count field, if it is non-zero to STDOUT or the logfile.
Definition: status.c:1059
errtyp_t get_errtyp(status_t res)
Get the error classification for the result code.
Definition: status.c:211
status_t set_error(const char *filename, int linenum, status_t status, int sqlError)
Generate an internal programming error report.
Definition: status.c:114
errtyp_t
error type
Definition: status_enum.h:193
status_t
global error return code
Definition: status_enum.h:210
global error status code enumerations