CUBRID Engine  latest
broker_error.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 
20 /*
21  * broker_error.h - Error code and message handling module
22  * This file contains exported stuffs from the error code and message
23  * handling modules.
24  */
25 
26 #ifndef _BROKER_ERROR_H_
27 #define _BROKER_ERROR_H_
28 
29 #ident "$Id$"
30 
31 #define UW_ER_NO_ERROR 0
32 #define UW_ER_NO_REQUEST_METHOD -11001
33 #define UW_ER_NOT_SUPPORTED_REQUEST_METHOD -11002
34 #define UW_ER_NO_APPL_NAME -11003
35 #define UW_ER_CANT_CREATE_SOCKET -11004
36 #define UW_ER_CANT_CONNECT -11005
37 #define UW_ER_CANT_BIND -11006
38 #define UW_ER_SOCKET_NOT_INITIALIZED -11007
39 #define UW_ER_CANT_ACCEPT -11008
40 #define UW_ER_NO_MORE_MEMORY -11009
41 #define UW_ER_NO_FREE_UTS -11010
42 #define UW_ER_NO_SESSION_UTS -11011
43 #define UW_ER_SESSION_NOT_FOUND -11012
44 #define UW_ER_SHM_OPEN -11013
45 #define UW_ER_SCRIPT_FILE -11014
46 #define UW_ER_UNKNOWN_FILE_C -11015
47 #define UW_ER_UNKNOWN_FILE_W -11016
48 #define UW_ER_DB_NOT_INITIALIZED -11017
49 #define UW_ER_SQL_HANDLE_NOT_FOUND -11018
50 #define UW_ER_INVALID_OBJECT -11019
51 #define UW_ER_INVALID_BIT -11020
52 #define UW_ER_INVALID_CHAR -11021
53 #define UW_ER_INVALID_DOUBLE -11022
54 #define UW_ER_INVALID_FLOAT -11023
55 #define UW_ER_INVALID_INT -11024
56 #define UW_ER_INVALID_MONETARY -11025
57 #define UW_ER_INVALID_NUMERIC -11026
58 #define UW_ER_INVALID_SET -11027
59 #define UW_ER_INVALID_SET_DOM -11028
60 #define UW_ER_INVALID_DOMAIN -11029
61 #define UW_ER_CMD_ARGS -11030
62 #define UW_ER_NOT_SUPPORT_SH_CMD -11031
63 #define UW_ER_COMMUNICATION -11032
64 #define UW_ER_DOMAIN_NON_SET -11033
65 #define UW_ER_DIVIDE_BY_ZERO -11034
66 #define UW_ER_FILE_MNG -11035
67 #define UW_ER_FILE_REMOVE -11036
68 #define UW_ER_FILE_COPY -11037
69 #define UW_ER_FILE_MOVE -11038
70 #define UW_ER_DIR_REMOVE -11039
71 #define UW_ER_DIR_MAKE -11040
72 #define UW_ER_FILE_CREATE -11041
73 #define UW_ER_FCNTL -11042
74 #define UW_ER_POST_DATA -11043
75 #define UW_ER_OPEN_TEMP_FILE -11044
76 #define UW_ER_FILE_UPLOAD -11045
77 #define UW_ER_FILE_WRITE -11046
78 #define UW_ER_SERVER_INFO -11047
79 #define UW_ER_DISP_WORK_DIR -11048
80 #define UW_ER_WIN_SERVER_CONF -11049
81 #define UW_ER_INVALID_CLIENT -11050
82 #define UW_ER_SHM_OPEN_MAGIC -11051
83 
84 #define UW_MIN_ERROR_CODE -11000
85 #define UW_MAX_ERROR_CODE -11051
86 
87 #define UW_SET_ERROR_CODE(code, os_errno) \
88  uw_set_error_code(__FILE__, __LINE__, (code), (os_errno))
89 
90 extern void uw_set_error_code (const char *file_name, int line_no, int error_code, int os_errno);
91 extern int uw_get_error_code (void);
92 extern int uw_get_os_error_code (void);
93 extern const char *uw_get_error_message (int error_code, int os_errno);
94 #if defined (ENABLE_UNUSED_FUNCTION)
95 extern const char *uw_error_message (int error_code);
96 extern void uw_error_message_r (int error_code, char *err_msg);
97 extern void uw_os_err_msg (int err_code, char *err_msg);
98 #endif
99 
100 #endif /* _BROKER_ERROR_H_ */
int uw_get_os_error_code(void)
Definition: broker_error.c:89
const char * uw_get_error_message(int error_code, int os_errno)
Definition: broker_error.c:109
void uw_set_error_code(const char *file_name, int line_no, int error_code, int os_errno)
Definition: broker_error.c:62
int uw_get_error_code(void)
Definition: broker_error.c:83