From e7b5b2c4b9c321085fa8e3549622aacbd6058923 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 (cherry picked from commit 2b1b8884ccd49e28bdf31a3c977a876a0f8c5283) Signed-off-by: Pedro Amorim (cherry picked from commit b431cd1d14b39651ea259ae06235923c7f33af33) Signed-off-by: Lucas Gass --- Koha/Account.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Koha/Account.pm b/Koha/Account.pm index 4c13a9a07e..387aa1bfa3 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -285,10 +285,8 @@ sub add_credit { Koha::Exceptions::Account::UnrecognisedType->throw( error => 'Type of credit not recognised' ); } - else { - $_->rethrow; - } } + $_->rethrow; }; return $line; -- 2.39.5