View | Details | Raw Unified | Return to bug 16572
Collapse All | Expand All

(-)a/C4/Installer.pm (-14 / +7 lines)
Lines 427-448 sub load_sql { Link Here
427
427
428
    my $dbh = $self->{ dbh };
428
    my $dbh = $self->{ dbh };
429
429
430
    my $dup_stderr;
430
    eval {
431
    do {
431
        DBIx::RunSQL->run_sql_file(
432
        local *STDERR;
432
            dbh     => $dbh,
433
        open STDERR, ">>", \$dup_stderr;
433
            sql     => $filename,
434
434
        );
435
        eval {
436
            DBIx::RunSQL->run_sql_file(
437
                dbh     => $dbh,
438
                sql     => $filename,
439
            );
440
        };
441
    };
435
    };
442
    #   errors thrown while loading installer data should be logged
436
    #   errors thrown while loading installer data should be logged
443
    if( $dup_stderr ) {
437
    if( $@ ) {
444
        warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n";
438
        warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n";
445
        $error = $dup_stderr;
439
        $error = $@;
446
440
447
    }
441
    }
448
442
449
- 

Return to bug 16572