Definition at line 13 of file error.c.
14{
16
18 {
21 return;
22 }
23
24 sqlca->sqlcode = code;
26
27 switch (code)
28 {
31 /*------
32 translator: this string will be truncated at 149 characters expanded. */
34 break;
35
38 /*------
39 translator: this string will be truncated at 149 characters expanded. */
41 break;
42
45 /*------
46 translator: this string will be truncated at 149 characters expanded. */
48 break;
49
52 /*------
53 translator: this string will be truncated at 149 characters expanded. */
55 break;
56
59 /*------
60 translator: this string will be truncated at 149 characters expanded. */
62 break;
63
66 /*------
67 translator: this string will be truncated at 149 characters expanded. */
68 ecpg_gettext(
"invalid input syntax for type int: \"%s\", on line %d"),
str, line);
69 break;
70
73 /*------
74 translator: this string will be truncated at 149 characters expanded. */
75 ecpg_gettext(
"invalid input syntax for type unsigned int: \"%s\", on line %d"),
str, line);
76 break;
77
80 /*------
81 translator: this string will be truncated at 149 characters expanded. */
82 ecpg_gettext(
"invalid input syntax for floating-point type: \"%s\", on line %d"),
str, line);
83 break;
84
88 /*------
89 translator: this string will be truncated at 149 characters expanded. */
90 ecpg_gettext(
"invalid syntax for type boolean: \"%s\", on line %d"),
str, line);
91 else
93 /*------
94 translator: this string will be truncated at 149 characters expanded. */
95 ecpg_gettext(
"could not convert boolean value: size mismatch, on line %d"), line);
96 break;
97
100 /*------
101 translator: this string will be truncated at 149 characters expanded. */
103 break;
104
107 /*------
108 translator: this string will be truncated at 149 characters expanded. */
109 ecpg_gettext(
"null value without indicator on line %d"), line);
110 break;
111
114 /*------
115 translator: this string will be truncated at 149 characters expanded. */
116 ecpg_gettext(
"variable does not have an array type on line %d"), line);
117 break;
118
121 /*------
122 translator: this string will be truncated at 149 characters expanded. */
123 ecpg_gettext(
"data read from server is not an array on line %d"), line);
124 break;
125
128 /*------
129 translator: this string will be truncated at 149 characters expanded. */
130 ecpg_gettext(
"inserting an array of variables is not supported on line %d"), line);
131 break;
132
135 /*------
136 translator: this string will be truncated at 149 characters expanded. */
137 ecpg_gettext(
"connection \"%s\" does not exist on line %d"),
str, line);
138 break;
139
142 /*------
143 translator: this string will be truncated at 149 characters expanded. */
144 ecpg_gettext(
"not connected to connection \"%s\" on line %d"),
str, line);
145 break;
146
149 /*------
150 translator: this string will be truncated at 149 characters expanded. */
152 break;
153
156 /*------
157 translator: this string will be truncated at 149 characters expanded. */
159 break;
160
163 /*------
164 translator: this string will be truncated at 149 characters expanded. */
165 ecpg_gettext(
"descriptor index out of range on line %d"), line);
166 break;
167
170 /*------
171 translator: this string will be truncated at 149 characters expanded. */
172 ecpg_gettext(
"unrecognized descriptor item \"%s\" on line %d"),
str, line);
173 break;
174
177 /*------
178 translator: this string will be truncated at 149 characters expanded. */
179 ecpg_gettext(
"variable does not have a numeric type on line %d"), line);
180 break;
181
184 /*------
185 translator: this string will be truncated at 149 characters expanded. */
186 ecpg_gettext(
"variable does not have a character type on line %d"), line);
187 break;
188
191 /*------
192 translator: this string will be truncated at 149 characters expanded. */
193 ecpg_gettext(
"error in transaction processing on line %d"), line);
194 break;
195
198 /*------
199 translator: this string will be truncated at 149 characters expanded. */
200 ecpg_gettext(
"could not connect to database \"%s\" on line %d"),
str, line);
201 break;
202
203 default:
205 /*------
206 translator: this string will be truncated at 149 characters expanded. */
208 break;
209 }
210
211 sqlca->sqlerrm.sqlerrml = strlen(
sqlca->sqlerrm.sqlerrmc);
212 ecpg_log(
"raising sqlcode %d on line %d: %s\n", code, line,
sqlca->sqlerrm.sqlerrmc);
213
214 /* free all memory we have allocated for the user */
216}
#define ECPG_CONVERT_BOOL
#define ECPG_UNKNOWN_DESCRIPTOR
#define ECPG_TOO_MANY_ARGUMENTS
#define ECPG_TOO_FEW_ARGUMENTS
#define ECPG_ARRAY_INSERT
#define ECPG_FLOAT_FORMAT
#define ECPG_UNKNOWN_DESCRIPTOR_ITEM
#define ECPG_MISSING_INDICATOR
#define ECPG_INVALID_DESCRIPTOR_INDEX
#define ECPG_INVALID_STMT
#define ECPG_VAR_NOT_NUMERIC
#define ECPG_VAR_NOT_CHAR
#define ECPG_OUT_OF_MEMORY
#define ECPG_DATA_NOT_ARRAY
struct sqlca_t * ECPGget_sqlca(void)
void ECPGfree_auto_mem(void)
References ECPG_ARRAY_INSERT, ECPG_CONNECT, ECPG_CONVERT_BOOL, ECPG_DATA_NOT_ARRAY, ECPG_EMPTY, ECPG_FLOAT_FORMAT, ecpg_gettext, ECPG_INT_FORMAT, ECPG_INVALID_DESCRIPTOR_INDEX, ECPG_INVALID_STMT, ecpg_log(), ECPG_MISSING_INDICATOR, ECPG_NO_ARRAY, ECPG_NO_CONN, ECPG_NOT_CONN, ECPG_NOT_FOUND, ECPG_OUT_OF_MEMORY, ECPG_TOO_FEW_ARGUMENTS, ECPG_TOO_MANY_ARGUMENTS, ECPG_TRANS, ECPG_UINT_FORMAT, ECPG_UNKNOWN_DESCRIPTOR, ECPG_UNKNOWN_DESCRIPTOR_ITEM, ECPG_UNSUPPORTED, ECPG_VAR_NOT_CHAR, ECPG_VAR_NOT_NUMERIC, ECPGfree_auto_mem(), ECPGget_sqlca(), snprintf, sqlca, sqlca_t::sqlstate, and str.
Referenced by deallocate_one(), ecpg_alloc(), ecpg_build_params(), ecpg_check_PQresult(), ecpg_do_prologue(), ecpg_find_desc(), ecpg_get_data(), ecpg_init(), ecpg_process_output(), ecpg_realloc(), ecpg_store_input(), ecpg_store_result(), ecpg_strdup(), ECPGallocate_desc(), ECPGconnect(), ECPGdeallocate(), ECPGdeallocate_desc(), ECPGdescribe(), ECPGdisconnect(), ECPGget_desc(), ECPGget_desc_header(), ECPGset_desc(), ECPGset_var(), ECPGstatus(), get_char_item(), get_int_item(), and set_int_item().