Bug 6387 - remove_items_from_biblioitems.pl doesn't handle errors
Summary: remove_items_from_biblioitems.pl doesn't handle errors
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: 3.6
Hardware: All All
: P5 - low enhancement
Assignee: Galen Charlton
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-22 20:23 UTC by Jared Camins-Esakov
Modified: 2012-10-26 00:41 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Camins-Esakov 2011-05-22 20:23:56 UTC
The script remove_items_from_biblioitems.pl needed for upgrading from Koha 3.2 to 3.4 doesn't handle errors properly, and when there's a badly corrupted record, it prints the following message and dies:
Undefined subroutine &MARC::Record::carp called at /usr/share/perl5/MARC/Record.pm line 565.

At the very least, remove_items_from_biblioitems.pl should print a useful error message, and ideally it should handle the error, rather than dying mid-way through.
Comment 1 Ian Walls 2011-05-24 17:38:18 UTC
This looks like an issue with MARC::Record, not necessarily remove_items_from_biblioitems.pl.  I see this line in MARC::Record 2.0.2 and possible 2.0.3

remove_items_from_biblioitems.pl has an error handling method built in to report any biblionumber that fails to parse, but it looks like this undefined subroutine error is preventing the code from reaching that point of error reporting.
Comment 2 Jared Camins-Esakov 2012-01-06 20:55:08 UTC
Marking this bug invalid based on Ian's comment.