generate_error @brief @param status @param token @param error @param result **/
| 350 | |
| 351 | **/ |
| 352 | static void generate_error(const NoCaseString& token, SSHORT error, char result) |
| 353 | { |
| 354 | string err_string; |
| 355 | |
| 356 | ISC_STATUS_ARRAY temp_status; |
| 357 | temp_status[0] = isc_arg_gds; |
| 358 | temp_status[1] = isc_sqlerr; |
| 359 | temp_status[2] = isc_arg_number; |
| 360 | temp_status[3] = -104; |
| 361 | temp_status[4] = isc_arg_gds; |
| 362 | |
| 363 | switch (error) |
| 364 | { |
| 365 | case UNEXPECTED_END_OF_COMMAND: |
| 366 | temp_status[5] = isc_command_end_err; |
| 367 | temp_status[6] = isc_arg_end; |
| 368 | break; |
| 369 | |
| 370 | case UNEXPECTED_TOKEN: |
| 371 | case TOKEN_TOO_LONG: |
| 372 | if (result) |
| 373 | { |
| 374 | err_string = result; |
| 375 | err_string += token.ToString(); |
| 376 | err_string += result; |
| 377 | } |
| 378 | else |
| 379 | err_string = token.ToString(); |
| 380 | temp_status[5] = isc_token_err; |
| 381 | temp_status[6] = isc_arg_gds; |
| 382 | temp_status[7] = isc_random; |
| 383 | temp_status[8] = isc_arg_string; |
| 384 | temp_status[9] = (ISC_STATUS)(err_string.c_str()); |
| 385 | temp_status[10] = isc_arg_end; |
| 386 | break; |
| 387 | } |
| 388 | |
| 389 | Arg::StatusVector(temp_status).raise(); |
| 390 | } |
no test coverage detected