diff --git a/bin/slubsipbuilderbagit.pl b/bin/slubsipbuilderbagit.pl index 2ecc927d9f438f22f111413c6752b59cbc7e12da..29f2ee696ec37805a803748e5e936340e2b5104d 100644 --- a/bin/slubsipbuilderbagit.pl +++ b/bin/slubsipbuilderbagit.pl @@ -282,7 +282,8 @@ package SLUB::LZA::SIPBuilderBagIt; say "Downloading MARC21 utility xsl '$marc_utils_url'"; my $result = $ua->get($marc_utils_url); if ($result->is_error) { - croak "Failed to download '$marc_utils_url' (required for metadata download by PPN), " . $result->error_as_HTML; + print_scalar_data("", "ERROR: Failed to download '$marc_utils_url' (required for metadata download by PPN), " . $result->error_as_HTML, "", "red"); + exit 1; } say "Saving MARC21 utility xsl to file '$marc_utils_path'"; my $xsl = $result->decoded_content; @@ -309,7 +310,8 @@ package SLUB::LZA::SIPBuilderBagIt; say "Downloading MARC21->MODS xsl '$marc_mods_url'"; my $result = $ua->get($marc_mods_url); if ($result->is_error) { - croak "Failed to download '$marc_mods_url' (required for metadata download by PPN), " . $result->error_as_HTML; + print_scalar_data("", "Failed to download '$marc_mods_url' (required for metadata download by PPN), " . $result->error_as_HTML, "", "red"); + exit 1; } say "Modifying MARC21->MODS xsl for offline use"; $xsl = $result->decoded_content;