avoid crashes if record in result set is corrupted
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
419d8fc0d8
commit
bedb9fffa0
1 changed files with 6 additions and 1 deletions
|
@ -56,7 +56,12 @@ sub transformMARCXML4XSLT {
|
|||
my $biblio = GetBiblioData($biblionumber);
|
||||
my $frameworkcode = GetFrameworkCode($biblionumber);
|
||||
my $tagslib = &GetMarcStructure(1,$frameworkcode);
|
||||
my @fields = $record->fields();
|
||||
my @fields;
|
||||
# FIXME: wish there was a better way to handle exceptions
|
||||
eval {
|
||||
@fields = $record->fields();
|
||||
};
|
||||
if ($@) { warn "PROBLEM WITH RECORD"; next; }
|
||||
my $list_of_authvalues = getAuthorisedValues4MARCSubfields($frameworkcode);
|
||||
for my $authvalue (@$list_of_authvalues) {
|
||||
for my $field ( $record->field($authvalue->{tagfield}) ) {
|
||||
|
|
Loading…
Reference in a new issue