diff options
author | Peter Powell <petpow@saberuk.com> | 2015-05-28 11:58:02 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2016-09-14 23:47:01 +0100 |
commit | 4133ccb04386bf03a064a035ba9229106b65a3f6 (patch) | |
tree | bddec06e6dd2e1ff40f4fc9bbf80101a04e51ba5 | |
parent | 42888e2907dacb829e2a29effbee83efb5bef6ec (diff) |
Allow print_error and print_warning to take multiple lines.
-rw-r--r-- | make/console.pm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/make/console.pm b/make/console.pm index 621de0274..8cdb56a21 100644 --- a/make/console.pm +++ b/make/console.pm @@ -64,15 +64,19 @@ sub print_format($;$) { print { $stream } $message; } -sub print_error($) { - my $message = shift; - print_format "<|RED Error:|> $message\n", *STDERR; +sub print_error { + print_format "<|RED Error:|> ", *STDERR; + for my $line (@_) { + print_format "$line\n", *STDERR; + } exit 1; } -sub print_warning($) { - my $message = shift; - print_format "<|YELLOW Warning:|> $message\n", *STDERR; +sub print_warning { + print_format "<|YELLOW Warning:|> ", *STDERR; + for my $line (@_) { + print_format "$line\n", *STDERR; + } } sub prompt_bool($$$) { |