Bug 19190: [Follow-up] Do not rely on the return of ModItem
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 28 Aug 2017 10:13:26 +0000 (12:13 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 11 Dec 2017 15:52:16 +0000 (16:52 +0100)
commit24a6ef2ba16f18923a5fd9d9439cfe7c84d9ca20
tree1a2fe61f678a686655ca16518108670524726997
parentdd2f28fab4853d917cc1c47e8fab5351335171fa
Bug 19190: [Follow-up] Do not rely on the return of ModItem

touch_all_items looks at the return of ModItem to determine if the
operation was successful. But ModItem does not return a meaningful
value. This patch puts the ModItem call in an eval and looks at $@.

Test plan:
Run touch_all_items with a where condition and verbose option.
Put print 1/0; at the end of ModItem.
Run touch_all_items again. You should see: ERROR WITH ITEM xxx !!!!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1fc0b652548510ef00a7e072cdf923357d5610aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
misc/maintenance/touch_all_items.pl