From 05beedf17e1de2f88ad0e1d159ef76530f7e01e8 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 Content-Type: text/plain; charset=utf-8 Found while running Items.t on top of 33608. Another exception was thrown but not rethrown. Signed-off-by: Marcel de Rooy --- 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.30.2