summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Dh_Lib.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-11-16 21:07:33 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-11-16 21:07:33 -0500
commit62ece7f4459ec9f924aa73427b7a9f3246cea34e (patch)
tree916f6ee1fc4b9b317083b50cc807e0a060e5dc12 /Debian/Debhelper/Dh_Lib.pm
parent97bda8bb14f0f314a5fa0b568e65443de3ab4f89 (diff)
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.
Diffstat (limited to 'Debian/Debhelper/Dh_Lib.pm')
-rw-r--r--Debian/Debhelper/Dh_Lib.pm5
1 files changed, 2 insertions, 3 deletions
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.