From b431cd1d14b39651ea259ae06235923c7f33af33 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 --- Koha/Account.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Koha/Account.pm b/Koha/Account.pm index d3da13a9db..f1529476bf 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -310,10 +310,8 @@ sub add_credit { Koha::Exceptions::Account::UnrecognisedType->throw( error => 'Type of credit not recognised' ); } - else { - $_->rethrow; - } } + $_->rethrow; }; return $line; -- 2.39.5