Bug 36473: Handle Invalid Metadata Exceptions in totalissues.pl
authorNick Clemens <nick@bywatersolutions.com>
Mon, 1 Apr 2024 14:32:08 +0000 (14:32 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 23 May 2024 12:49:30 +0000 (14:49 +0200)
commitd397da65c02ee40243aacdc3382e68b84e040921
treebb9ea7bac50b1150c49ed1c9fb766245aa462d96
parentd80334a1087bc4e0dc50174a3d3d30217dfe8831
Bug 36473: Handle Invalid Metadata Exceptions in totalissues.pl

This patch wraps the call for record in an eval, and catches any invalid metadata
exceptions, letting the warning show, but allowing the script to continue
To test:
1 - In default KTD record 369 has problems, otherwise you need to break a record
2 - Run : misc/cronjobs/update_totalissues.pl --use-stats --commit=1000 -v
3 - It dies at record 369 (or the one you broke)
4 - Apply patch
5 - Run again
6 - It succeeds, but skips the bad record

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f3d2f34d7a6aeead30b40a30b239f15c6c94a7f2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Biblio.pm