|
Lines 56-61
sub BINMODE {
Link Here
|
| 56 |
binmode( STDOUT, $mode ); |
56 |
binmode( STDOUT, $mode ); |
| 57 |
} |
57 |
} |
| 58 |
|
58 |
|
|
|
59 |
=head2 DIE signal handler |
| 60 |
|
| 61 |
A global die handler to capture fatal errors and ensures they are logged. |
| 62 |
When DIE is emitted, the message will be logged using Koha::Logger if available, |
| 63 |
and also printed to stderr |
| 64 |
|
| 65 |
=cut |
| 66 |
|
| 59 |
$SIG{__DIE__} = sub { |
67 |
$SIG{__DIE__} = sub { |
| 60 |
my $msg = shift; |
68 |
my $msg = shift; |
| 61 |
my $logger = Koha::Logger->get( { interface => 'sip', category => 'STDERR' } ); |
69 |
my $logger = Koha::Logger->get( { interface => 'sip', category => 'STDERR' } ); |
| 62 |
- |
|
|