From: Joey Hess Date: Tue, 17 Nov 2009 02:07:33 +0000 (-0500) Subject: make error() throw a catchable error with die X-Git-Tag: 7.4.4~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=62ece7f4459ec9f924aa73427b7a9f3246cea34e;p=debhelper.git make error() throw a catchable error with die exit cannot be caught with eval.. I used exit before because I thought it was cute for erorr() to call warning(). Silly. --- diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index 960f272..c5b06f6 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -251,12 +251,11 @@ sub verbose_print { } } -# Output an error message and exit. +# Output an error message and die (can be caught). sub error { my $message=shift; - warning($message); - exit 1; + die basename($0).": $message\n"; } # Output a warning.