@@ -21,260 +21,182 @@ ecpg_raise(int line, int code, const char *sqlstate, const char *str)
2121 {
2222 case ECPG_NOT_FOUND :
2323 snprintf (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. */
2926 ecpg_gettext ("no data found on line %d" ), line );
3027 break ;
3128
3229 case ECPG_OUT_OF_MEMORY :
3330 snprintf (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. */
3933 ecpg_gettext ("out of memory on line %d" ), line );
4034 break ;
4135
4236 case ECPG_UNSUPPORTED :
4337 snprintf (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. */
4940 ecpg_gettext ("unsupported type \"%s\" on line %d" ), str , line );
5041 break ;
5142
5243 case ECPG_TOO_MANY_ARGUMENTS :
5344 snprintf (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. */
5947 ecpg_gettext ("too many arguments on line %d" ), line );
6048 break ;
6149
6250 case ECPG_TOO_FEW_ARGUMENTS :
6351 snprintf (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. */
6954 ecpg_gettext ("too few arguments on line %d" ), line );
7055 break ;
7156
7257 case ECPG_INT_FORMAT :
7358 snprintf (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. */
7961 ecpg_gettext ("invalid input syntax for type int: \"%s\", on line %d" ), str , line );
8062 break ;
8163
8264 case ECPG_UINT_FORMAT :
8365 snprintf (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. */
8968 ecpg_gettext ("invalid input syntax for type unsigned int: \"%s\", on line %d" ), str , line );
9069 break ;
9170
9271 case ECPG_FLOAT_FORMAT :
9372 snprintf (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. */
9975 ecpg_gettext ("invalid input syntax for floating-point type: \"%s\", on line %d" ), str , line );
10076 break ;
10177
10278 case ECPG_CONVERT_BOOL :
10379 if (str )
10480 snprintf (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. */
11083 ecpg_gettext ("invalid syntax for type boolean: \"%s\", on line %d" ), str , line );
11184 else
11285 snprintf (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. */
11888 ecpg_gettext ("could not convert boolean value: size mismatch, on line %d" ), line );
11989 break ;
12090
12191 case ECPG_EMPTY :
12292 snprintf (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. */
12895 ecpg_gettext ("empty query on line %d" ), line );
12996 break ;
13097
13198 case ECPG_MISSING_INDICATOR :
13299 snprintf (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. */
138102 ecpg_gettext ("null value without indicator on line %d" ), line );
139103 break ;
140104
141105 case ECPG_NO_ARRAY :
142106 snprintf (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. */
148109 ecpg_gettext ("variable does not have an array type on line %d" ), line );
149110 break ;
150111
151112 case ECPG_DATA_NOT_ARRAY :
152113 snprintf (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. */
158116 ecpg_gettext ("data read from server is not an array on line %d" ), line );
159117 break ;
160118
161119 case ECPG_ARRAY_INSERT :
162120 snprintf (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. */
168123 ecpg_gettext ("inserting an array of variables is not supported on line %d" ), line );
169124 break ;
170125
171126 case ECPG_NO_CONN :
172127 snprintf (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. */
178130 ecpg_gettext ("connection \"%s\" does not exist on line %d" ), str , line );
179131 break ;
180132
181133 case ECPG_NOT_CONN :
182134 snprintf (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. */
188137 ecpg_gettext ("not connected to connection \"%s\" on line %d" ), str , line );
189138 break ;
190139
191140 case ECPG_INVALID_STMT :
192141 snprintf (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. */
198144 ecpg_gettext ("invalid statement name \"%s\" on line %d" ), str , line );
199145 break ;
200146
201147 case ECPG_UNKNOWN_DESCRIPTOR :
202148 snprintf (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. */
208151 ecpg_gettext ("descriptor \"%s\" not found on line %d" ), str , line );
209152 break ;
210153
211154 case ECPG_INVALID_DESCRIPTOR_INDEX :
212155 snprintf (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. */
218158 ecpg_gettext ("descriptor index out of range on line %d" ), line );
219159 break ;
220160
221161 case ECPG_UNKNOWN_DESCRIPTOR_ITEM :
222162 snprintf (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. */
228165 ecpg_gettext ("unrecognized descriptor item \"%s\" on line %d" ), str , line );
229166 break ;
230167
231168 case ECPG_VAR_NOT_NUMERIC :
232169 snprintf (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. */
238172 ecpg_gettext ("variable does not have a numeric type on line %d" ), line );
239173 break ;
240174
241175 case ECPG_VAR_NOT_CHAR :
242176 snprintf (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. */
248179 ecpg_gettext ("variable does not have a character type on line %d" ), line );
249180 break ;
250181
251182 case ECPG_TRANS :
252183 snprintf (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. */
258186 ecpg_gettext ("error in transaction processing on line %d" ), line );
259187 break ;
260188
261189 case ECPG_CONNECT :
262190 snprintf (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. */
268193 ecpg_gettext ("could not connect to database \"%s\" on line %d" ), str , line );
269194 break ;
270195
271196 default :
272197 snprintf (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. */
278200 ecpg_gettext ("SQL error %d on line %d" ), code , line );
279201 break ;
280202 }
0 commit comments