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

(-)a/C4/Letters.pm (-4 / +8 lines)
Lines 23-29 use Carp qw( carp croak ); Link Here
23
use Template;
23
use Template;
24
use Module::Load::Conditional qw( can_load );
24
use Module::Load::Conditional qw( can_load );
25
25
26
use Try::Tiny qw( catch try );
26
use Try::Tiny;
27
27
28
use C4::Members;
28
use C4::Members;
29
use C4::Log qw( logaction );
29
use C4::Log qw( logaction );
Lines 1620-1627 sub _process_tt { Link Here
1620
    my $output;
1620
    my $output;
1621
    my $schema = Koha::Database->new->schema;
1621
    my $schema = Koha::Database->new->schema;
1622
    $schema->txn_begin;
1622
    $schema->txn_begin;
1623
    $template->process( \$content, $tt_params, \$output ) || croak "ERROR PROCESSING TEMPLATE: " . $template->error();
1623
    my $processed = try {
1624
    $schema->txn_rollback;
1624
        $template->process( \$content, $tt_params, \$output );
1625
    }
1626
    finally {
1627
        $schema->txn_rollback;
1628
    };
1629
    croak "ERROR PROCESSING TEMPLATE: " . $template->error() unless $processed;
1625
1630
1626
    return $output;
1631
    return $output;
1627
}
1632
}
1628
- 

Return to bug 32442