TPAC: Protect against missing 901c in legacy MARCXML user/dbs/avoid_901c_death
authorDan Scott <dscott@laurentian.ca>
Fri, 25 Nov 2011 17:30:24 +0000 (12:30 -0500)
committerDan Scott <dscott@laurentian.ca>
Fri, 25 Nov 2011 17:30:24 +0000 (12:30 -0500)
commitf0dfd67d9a129c7c73f8b01cc7e09861b6024d7b
tree9ddf391ab2caad619ceb68f15bdf691ab44f1446
parentc1202c1492a210ea51610a164d938faef4a4d28c
TPAC: Protect against missing 901c in legacy MARCXML

Bad MARCXML to which Evergreen has been unable to add a 901c happens -
particularly with legacy MARCXML. Currently, TPAC crashes hard with an
ugly error if a 901c is not found when attempting to display the record
in search results. In comparison, the JSPAC displays the record without
a problem.

This commit logs a warning and enables the TPAC to continue somewhat
gracefully (the problem record is simply skipped in the search results).
A more robust solution may be to teach unapi.bre to add the record ID to
the results and to have the TPAC pull from that, rather than relying on
the MARCXML itself to contain the record ID.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm