From 2b1b8884ccd49e28bdf31a3c977a876a0f8c5283 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 20 Jul 2023 07:45:05 +0000 Subject: [PATCH] Bug 34316: Add_credit should rethrow an exception correctly Found while running Items.t on top of 33608. Another exception was thrown but not rethrown. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit fa9750e24de0a6300d683a1316b64e9bed248c4b) Signed-off-by: Fridolin Somers --- Koha/Account.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Koha/Account.pm b/Koha/Account.pm index 6e63242eb9..09cf0ad8ce 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -317,10 +317,8 @@ sub add_credit { Koha::Exceptions::Account::UnrecognisedType->throw( error => 'Type of credit not recognised' ); } - else { - $_->rethrow; - } } + $_->rethrow; }; return $line; -- 2.39.5