@@ -21,260 +21,182 @@ ecpg_raise(int line, int code, const char *sqlstate, const char *str)
2121{
2222case ECPG_NOT_FOUND :
2323snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
24-
25- /*
26- * translator: this string will be truncated at 149 characters
27- * expanded.
28- */
24+ /*------
25+ translator: this string will be truncated at 149 characters expanded. */
2926ecpg_gettext ("no data found on line %d" ),line );
3027break ;
3128
3229case ECPG_OUT_OF_MEMORY :
3330snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
34-
35- /*
36- * translator: this string will be truncated at 149 characters
37- * expanded.
38- */
31+ /*------
32+ translator: this string will be truncated at 149 characters expanded. */
3933ecpg_gettext ("out of memory on line %d" ),line );
4034break ;
4135
4236case ECPG_UNSUPPORTED :
4337snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
44-
45- /*
46- * translator: this string will be truncated at 149 characters
47- * expanded.
48- */
38+ /*------
39+ translator: this string will be truncated at 149 characters expanded. */
4940ecpg_gettext ("unsupported type \"%s\" on line %d" ),str ,line );
5041break ;
5142
5243case ECPG_TOO_MANY_ARGUMENTS :
5344snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
54-
55- /*
56- * translator: this string will be truncated at 149 characters
57- * expanded.
58- */
45+ /*------
46+ translator: this string will be truncated at 149 characters expanded. */
5947ecpg_gettext ("too many arguments on line %d" ),line );
6048break ;
6149
6250case ECPG_TOO_FEW_ARGUMENTS :
6351snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
64-
65- /*
66- * translator: this string will be truncated at 149 characters
67- * expanded.
68- */
52+ /*------
53+ translator: this string will be truncated at 149 characters expanded. */
6954ecpg_gettext ("too few arguments on line %d" ),line );
7055break ;
7156
7257case ECPG_INT_FORMAT :
7358snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
74-
75- /*
76- * translator: this string will be truncated at 149 characters
77- * expanded.
78- */
59+ /*------
60+ translator: this string will be truncated at 149 characters expanded. */
7961ecpg_gettext ("invalid input syntax for type int: \"%s\", on line %d" ),str ,line );
8062break ;
8163
8264case ECPG_UINT_FORMAT :
8365snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
84-
85- /*
86- * translator: this string will be truncated at 149 characters
87- * expanded.
88- */
66+ /*------
67+ translator: this string will be truncated at 149 characters expanded. */
8968ecpg_gettext ("invalid input syntax for type unsigned int: \"%s\", on line %d" ),str ,line );
9069break ;
9170
9271case ECPG_FLOAT_FORMAT :
9372snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
94-
95- /*
96- * translator: this string will be truncated at 149 characters
97- * expanded.
98- */
73+ /*------
74+ translator: this string will be truncated at 149 characters expanded. */
9975ecpg_gettext ("invalid input syntax for floating-point type: \"%s\", on line %d" ),str ,line );
10076break ;
10177
10278case ECPG_CONVERT_BOOL :
10379if (str )
10480snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
105-
106- /*
107- * translator: this string will be truncated at 149 characters
108- * expanded.
109- */
81+ /*------
82+ translator: this string will be truncated at 149 characters expanded. */
11083ecpg_gettext ("invalid syntax for type boolean: \"%s\", on line %d" ),str ,line );
11184else
11285snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
113-
114- /*
115- * translator: this string will be truncated at 149 characters
116- * expanded.
117- */
86+ /*------
87+ translator: this string will be truncated at 149 characters expanded. */
11888ecpg_gettext ("could not convert boolean value: size mismatch, on line %d" ),line );
11989break ;
12090
12191case ECPG_EMPTY :
12292snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
123-
124- /*
125- * translator: this string will be truncated at 149 characters
126- * expanded.
127- */
93+ /*------
94+ translator: this string will be truncated at 149 characters expanded. */
12895ecpg_gettext ("empty query on line %d" ),line );
12996break ;
13097
13198case ECPG_MISSING_INDICATOR :
13299snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
133-
134- /*
135- * translator: this string will be truncated at 149 characters
136- * expanded.
137- */
100+ /*------
101+ translator: this string will be truncated at 149 characters expanded. */
138102ecpg_gettext ("null value without indicator on line %d" ),line );
139103break ;
140104
141105case ECPG_NO_ARRAY :
142106snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
143-
144- /*
145- * translator: this string will be truncated at 149 characters
146- * expanded.
147- */
107+ /*------
108+ translator: this string will be truncated at 149 characters expanded. */
148109ecpg_gettext ("variable does not have an array type on line %d" ),line );
149110break ;
150111
151112case ECPG_DATA_NOT_ARRAY :
152113snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
153-
154- /*
155- * translator: this string will be truncated at 149 characters
156- * expanded.
157- */
114+ /*------
115+ translator: this string will be truncated at 149 characters expanded. */
158116ecpg_gettext ("data read from server is not an array on line %d" ),line );
159117break ;
160118
161119case ECPG_ARRAY_INSERT :
162120snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
163-
164- /*
165- * translator: this string will be truncated at 149 characters
166- * expanded.
167- */
121+ /*------
122+ translator: this string will be truncated at 149 characters expanded. */
168123ecpg_gettext ("inserting an array of variables is not supported on line %d" ),line );
169124break ;
170125
171126case ECPG_NO_CONN :
172127snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
173-
174- /*
175- * translator: this string will be truncated at 149 characters
176- * expanded.
177- */
128+ /*------
129+ translator: this string will be truncated at 149 characters expanded. */
178130ecpg_gettext ("connection \"%s\" does not exist on line %d" ),str ,line );
179131break ;
180132
181133case ECPG_NOT_CONN :
182134snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
183-
184- /*
185- * translator: this string will be truncated at 149 characters
186- * expanded.
187- */
135+ /*------
136+ translator: this string will be truncated at 149 characters expanded. */
188137ecpg_gettext ("not connected to connection \"%s\" on line %d" ),str ,line );
189138break ;
190139
191140case ECPG_INVALID_STMT :
192141snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
193-
194- /*
195- * translator: this string will be truncated at 149 characters
196- * expanded.
197- */
142+ /*------
143+ translator: this string will be truncated at 149 characters expanded. */
198144ecpg_gettext ("invalid statement name \"%s\" on line %d" ),str ,line );
199145break ;
200146
201147case ECPG_UNKNOWN_DESCRIPTOR :
202148snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
203-
204- /*
205- * translator: this string will be truncated at 149 characters
206- * expanded.
207- */
149+ /*------
150+ translator: this string will be truncated at 149 characters expanded. */
208151ecpg_gettext ("descriptor \"%s\" not found on line %d" ),str ,line );
209152break ;
210153
211154case ECPG_INVALID_DESCRIPTOR_INDEX :
212155snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
213-
214- /*
215- * translator: this string will be truncated at 149 characters
216- * expanded.
217- */
156+ /*------
157+ translator: this string will be truncated at 149 characters expanded. */
218158ecpg_gettext ("descriptor index out of range on line %d" ),line );
219159break ;
220160
221161case ECPG_UNKNOWN_DESCRIPTOR_ITEM :
222162snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
223-
224- /*
225- * translator: this string will be truncated at 149 characters
226- * expanded.
227- */
163+ /*------
164+ translator: this string will be truncated at 149 characters expanded. */
228165ecpg_gettext ("unrecognized descriptor item \"%s\" on line %d" ),str ,line );
229166break ;
230167
231168case ECPG_VAR_NOT_NUMERIC :
232169snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
233-
234- /*
235- * translator: this string will be truncated at 149 characters
236- * expanded.
237- */
170+ /*------
171+ translator: this string will be truncated at 149 characters expanded. */
238172ecpg_gettext ("variable does not have a numeric type on line %d" ),line );
239173break ;
240174
241175case ECPG_VAR_NOT_CHAR :
242176snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
243-
244- /*
245- * translator: this string will be truncated at 149 characters
246- * expanded.
247- */
177+ /*------
178+ translator: this string will be truncated at 149 characters expanded. */
248179ecpg_gettext ("variable does not have a character type on line %d" ),line );
249180break ;
250181
251182case ECPG_TRANS :
252183snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
253-
254- /*
255- * translator: this string will be truncated at 149 characters
256- * expanded.
257- */
184+ /*------
185+ translator: this string will be truncated at 149 characters expanded. */
258186ecpg_gettext ("error in transaction processing on line %d" ),line );
259187break ;
260188
261189case ECPG_CONNECT :
262190snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
263-
264- /*
265- * translator: this string will be truncated at 149 characters
266- * expanded.
267- */
191+ /*------
192+ translator: this string will be truncated at 149 characters expanded. */
268193ecpg_gettext ("could not connect to database \"%s\" on line %d" ),str ,line );
269194break ;
270195
271196default :
272197snprintf (sqlca -> sqlerrm .sqlerrmc ,sizeof (sqlca -> sqlerrm .sqlerrmc ),
273-
274- /*
275- * translator: this string will be truncated at 149 characters
276- * expanded.
277- */
198+ /*------
199+ translator: this string will be truncated at 149 characters expanded. */
278200ecpg_gettext ("SQL error %d on line %d" ),code ,line );
279201break ;
280202}