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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Marcel de Rooy 2023-07-20 07:45:05 +00:00 committed by Tomas Cohen Arazi
parent 9919d7afd4
commit fa9750e24d
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -317,10 +317,8 @@ sub add_credit {
Koha::Exceptions::Account::UnrecognisedType->throw( Koha::Exceptions::Account::UnrecognisedType->throw(
error => 'Type of credit not recognised' ); error => 'Type of credit not recognised' );
} }
else {
$_->rethrow;
}
} }
$_->rethrow;
}; };
return $line; return $line;