From 09433b6e12471d2919eb8b37614974b824240315 Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Tue, 14 Mar 2023 08:28:30 -0400 Subject: [PATCH] Bug 33216: Catch and handle all Koha exceptions --- C4/SIP/ILS/Transaction/FeePayment.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/SIP/ILS/Transaction/FeePayment.pm b/C4/SIP/ILS/Transaction/FeePayment.pm index 85d58cdc23..7574a82305 100644 --- a/C4/SIP/ILS/Transaction/FeePayment.pm +++ b/C4/SIP/ILS/Transaction/FeePayment.pm @@ -84,9 +84,9 @@ sub pay { $pay_response = $account->pay($pay_options); } catch { - if ( ref($_) eq 'Koha::Exceptions::Account::RegisterRequired' ) { - $ok = 0; - $error = q{SIP account must be associated with a register for 'fee paid' messages to succeed}; + if ( ref($_) =~ /^Koha::Exceptions/ ) { + $ok = 0; + $error = $_->description; } else { $_->rethrow; -- 2.30.2