diff --git a/bin/slubsipbuilderbagit.pl b/bin/slubsipbuilderbagit.pl index db71bc4c530f079947e87e8dae86014aa4ddf6a1..b56c702903f715824a1b866b14ffc6f5b719ede1 100644 --- a/bin/slubsipbuilderbagit.pl +++ b/bin/slubsipbuilderbagit.pl @@ -205,7 +205,10 @@ package SLUB::LZA::SIPBuilderBagIt; SLUB::LZA::SIPBuilderBagIt::write_file("DEBUG_${ppn}_catalog_response.xml", $response->decoded_content); } my $recordData = $xp->findnodes_as_string('/*[local-name()="searchRetrieveResponse"]/*[local-name()="records"]/*[local-name()="record"]/*[local-name()="recordData"]/*'); - if (!$recordData) { croak("ERROR: Did not get any <recordData/> for PPN '$ppn' using '$sru'");} + if (!$recordData) { + print_scalar_data("", "ERROR: did not get any <recordData/> for PPN '$ppn' using '$sru'", "", "red"); + die(); + } my $marc_doc = $parser->parse_string($recordData); add_marc21_schema_location($marc_doc); if ($with_debug) {