Skip to content
Snippets Groups Projects
Commit e7bf4134 authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- improved user infos: colored text instead of croak

parent d6e5f8d9
No related branches found
No related tags found
No related merge requests found
...@@ -282,7 +282,8 @@ package SLUB::LZA::SIPBuilderBagIt; ...@@ -282,7 +282,8 @@ package SLUB::LZA::SIPBuilderBagIt;
say "Downloading MARC21 utility xsl '$marc_utils_url'"; say "Downloading MARC21 utility xsl '$marc_utils_url'";
my $result = $ua->get($marc_utils_url); my $result = $ua->get($marc_utils_url);
if ($result->is_error) { 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'"; say "Saving MARC21 utility xsl to file '$marc_utils_path'";
my $xsl = $result->decoded_content; my $xsl = $result->decoded_content;
...@@ -309,7 +310,8 @@ package SLUB::LZA::SIPBuilderBagIt; ...@@ -309,7 +310,8 @@ package SLUB::LZA::SIPBuilderBagIt;
say "Downloading MARC21->MODS xsl '$marc_mods_url'"; say "Downloading MARC21->MODS xsl '$marc_mods_url'";
my $result = $ua->get($marc_mods_url); my $result = $ua->get($marc_mods_url);
if ($result->is_error) { 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"; say "Modifying MARC21->MODS xsl for offline use";
$xsl = $result->decoded_content; $xsl = $result->decoded_content;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment