diff options
author | Niels Thykier <niels@thykier.net> | 2019-02-25 07:22:44 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2019-02-25 07:24:34 +0000 |
commit | 5e2f5a7777cffe4bc7a89fa20dc958954aeda809 (patch) | |
tree | aead639aa7e8f4b4a84f0b5835b2443d70fabdd2 /lib | |
parent | aae4b351619d5ec6a2c2c9f6212a6a9afccfc9bb (diff) | |
download | debhelper-5e2f5a7777cffe4bc7a89fa20dc958954aeda809.tar.gz |
Dh_Lib: Ensure error uses a well-defined stable error code
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Debian/Debhelper/Dh_Lib.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Debian/Debhelper/Dh_Lib.pm b/lib/Debian/Debhelper/Dh_Lib.pm index 00703214..c707197c 100644 --- a/lib/Debian/Debhelper/Dh_Lib.pm +++ b/lib/Debian/Debhelper/Dh_Lib.pm @@ -761,8 +761,9 @@ sub nonquiet_print { # Output an error message and die (can be caught). sub error { - my $message=shift; - + my ($message) = @_; + # ensure the error code is well defined. + $! = 255; die basename($0).": $message\n"; } |