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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 9 Oct 2017 19:15:48 +0000 (16:15 -0300)
commit1fc0b652548510ef00a7e072cdf923357d5610aa
tree28d66c6dcb2754eb3d07522b71247564824bc97e
parentb3b86caaa5473ea51dc7223146e4c7cf0db431dc
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>
misc/maintenance/touch_all_items.pl