From 5f9bf7974e4c96ccc6a61313848263c1a5379b4e Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 12 Jun 2025 08:43:03 -0400 Subject: [PATCH] Bug 39911: Add POD Signed-off-by: Lucas Gass (cherry picked from commit 702d1d2792c00431f657cd5b4cff409997375d7c) Signed-off-by: Paul Derscheid (cherry picked from commit 90aca69657fc23b10dc2f3084b141b7a6042feb5) Signed-off-by: Fridolin Somers --- C4/SIP/Trapper.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/C4/SIP/Trapper.pm b/C4/SIP/Trapper.pm index 586612ed10..b3a870ffb4 100644 --- a/C4/SIP/Trapper.pm +++ b/C4/SIP/Trapper.pm @@ -57,6 +57,14 @@ sub BINMODE { binmode( STDOUT, $mode ); }; +=head2 DIE signal handler + + A global die handler to capture fatal errors and ensures they are logged. + When DIE is emitted, the message will be logged using Koha::Logger if available, + and also printed to stderr + +=cut + $SIG{__DIE__} = sub { my $msg = shift; my $logger = Koha::Logger->get( { interface => 'sip', category => 'STDERR' } );