Bug 26171: Show biblionumber in Koha::Exceptions::Metadata::Invalid
authorFridolin Somers <fridolin.somers@biblibre.com>
Fri, 7 Aug 2020 08:05:52 +0000 (10:05 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 4 Jan 2021 12:29:50 +0000 (13:29 +0100)
commit3b987412f699d16794520e1b3ec1b04b82fdd4e4
treebf1433c9f75e63fa113d84492a75f60da896cc03
parent92dbe809021ea1f7ee44e51387b48d9ffbda1fea
Bug 26171: Show biblionumber in Koha::Exceptions::Metadata::Invalid

Bug 23846 added a check for invalid MARCXML in search_for_data_inconsistencies.pl.
But the error message does not show the biblionumber of invalid biblio record.

Test plan:
1) Import a bibliographic record with invalid XML, you can add non printable characters, like 0x1F (CTRL-V 1F with vim)
2) Run misc/maintenance/search_for_data_inconsistencies.pl
3) Check you see correct biblionumber in error message :
Invalid data, cannot decode object (id=xxx, biblionumber=yyy, format=marcxml, schema=zzz, decoding_error=...

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Biblio/Metadata.pm
Koha/Exceptions/Metadata.pm