From 62ece7f4459ec9f924aa73427b7a9f3246cea34e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 16 Nov 2009 21:07:33 -0500 Subject: 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. --- Debian/Debhelper/Dh_Lib.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Debian') diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index 960f2721..c5b06f69 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. -- cgit v1.2.3