From f3e54722ffda8f8c43ce16bc66decce8300ab450 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 8 May 2025 22:35:30 +0000 Subject: [PATCH] Bug 23010: Clean up try/catch in additem.pl --- cataloguing/additem.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 6c8a5bef1e7..c1067f44bf3 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -645,9 +645,7 @@ if ( $op eq "cud-additem" ) { try { $item->store; } catch { - if ( ref $_ && $_->can('error') ) { - push @errors, $_->error; - } + push @errors, $_->error; } } -- 2.39.5