From 12832883e17a30b659d24dadaa42c36fe1e8c94a Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 25 May 2021 09:59:07 +0000 Subject: [PATCH] Bug 28158: [alternate] Use try/catch instead of eval This could be improved, we could actually handle any exceptions, but switching to 'try/catch' seems to resolve the issue --- tools/batchMod.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index b36752c77d..ae1a97ec36 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -298,7 +298,7 @@ if ($op eq "action") { $modified += UpdateMarcWith( $marcitem, $localmarcitem ); if ($modified) { - eval { + try { if ( my $item = ModItemFromMarc( $localmarcitem, @@ -316,7 +316,7 @@ if ($op eq "action") { ) if $item->{itemlost} and not $itemdata->{itemlost}; } - }; + } catch {}; push @$upd_biblionumbers, $itemdata->{'biblionumber'}; } } -- 2.11.0