| 392 | } |
| 393 | |
| 394 | void UtilInterface::loadBlob(CheckStatusWrapper* status, ISC_QUAD* blobId, |
| 395 | IAttachment* att, ITransaction* tra, const char* file_name, FB_BOOLEAN txt) |
| 396 | { |
| 397 | /************************************** |
| 398 | * |
| 399 | * l o a d B l o b |
| 400 | * |
| 401 | ************************************** |
| 402 | * |
| 403 | * Functional description |
| 404 | * Load a blob with the contents of a file. |
| 405 | * |
| 406 | **************************************/ |
| 407 | FILE* file = os_utils::fopen(file_name, txt ? FOPEN_READ_TYPE_TEXT : FOPEN_READ_TYPE); |
| 408 | try |
| 409 | { |
| 410 | if (!file) |
| 411 | system_error::raise("fopen"); |
| 412 | |
| 413 | if (!att) |
| 414 | Arg::Gds(isc_bad_db_handle).raise(); |
| 415 | |
| 416 | load(status, blobId, att, tra, file); |
| 417 | } |
| 418 | catch (const Exception& ex) |
| 419 | { |
| 420 | ex.stuffException(status); |
| 421 | } |
| 422 | |
| 423 | if (file) |
| 424 | fclose(file); |
| 425 | } |
| 426 | |
| 427 | void UtilInterface::getFbVersion(CheckStatusWrapper* status, IAttachment* att, |
| 428 | IVersionCallback* callback) |
no test coverage detected