MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ndberror.h
1 /*
2  Copyright (C) 2004-2006 MySQL AB
3  All rights reserved. Use is subject to license terms.
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; version 2 of the License.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 #ifndef NDBERROR_H
20 #define NDBERROR_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
27 
28 typedef enum
29 {
30  ndberror_st_success = 0,
31  ndberror_st_temporary = 1,
32  ndberror_st_permanent = 2,
33  ndberror_st_unknown = 3
34 } ndberror_status_enum;
35 
36 typedef enum
37 {
38  ndberror_cl_none = 0,
39  ndberror_cl_application = 1,
40  ndberror_cl_no_data_found = 2,
41  ndberror_cl_constraint_violation = 3,
42  ndberror_cl_schema_error = 4,
43  ndberror_cl_user_defined = 5,
44  ndberror_cl_insufficient_space = 6,
45  ndberror_cl_temporary_resource = 7,
46  ndberror_cl_node_recovery = 8,
47  ndberror_cl_overload = 9,
48  ndberror_cl_timeout_expired = 10,
49  ndberror_cl_unknown_result = 11,
50  ndberror_cl_internal_error = 12,
51  ndberror_cl_function_not_implemented = 13,
52  ndberror_cl_unknown_error_code = 14,
53  ndberror_cl_node_shutdown = 15,
54  ndberror_cl_configuration = 16,
55  ndberror_cl_schema_object_already_exists = 17,
56  ndberror_cl_internal_temporary = 18
57 } ndberror_classification_enum;
58 
59 
60 typedef struct {
61 
65  ndberror_status_enum status;
66 
70  ndberror_classification_enum classification;
71 
75  int code;
76 
81 
85  const char * message;
86 
93  char * details;
94 
96 
97 
98 typedef ndberror_status_enum ndberror_status;
99 typedef ndberror_classification_enum ndberror_classification;
100 
101 const char *ndberror_status_message(ndberror_status);
102 const char *ndberror_classification_message(ndberror_classification);
103 void ndberror_update(ndberror_struct *);
104 int ndb_error_string(int err_no, char *str, int size);
105 
106 #endif /* doxygen skip internal*/
107 
108 #ifdef __cplusplus
109 }
110 #endif
111 
112 #endif