From 6ec6391d8ef77b40c4748591820147ff10de300d Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Fri, 18 Jan 2008 15:02:58 +0100 Subject: [PATCH] Fix error handling in changelog/debian.pl * scripts/changelog/debian.pl: Don't hide failures inside eval(). * scripts/Dpkg/Changelog.pm (data2rfc822): Don't fail if argument is undef. --- scripts/Dpkg/Changelog.pm | 6 ++++-- scripts/changelog/debian.pl | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/Dpkg/Changelog.pm b/scripts/Dpkg/Changelog.pm index 38b93a01..ffa1740e 100644 --- a/scripts/Dpkg/Changelog.pm +++ b/scripts/Dpkg/Changelog.pm @@ -573,7 +573,7 @@ specified B itself. =back -The following options also supported by all output methods but +The following options are also supported by all output methods but don't take version numbers as values: =over 4 @@ -666,10 +666,12 @@ sub data2rfc822 { } return join "\n", @rfc822; - } else { + } elsif (ref($data)) { my $rfc822_str = $data->output; return $rfc822_str; + } else { + return; } } diff --git a/scripts/changelog/debian.pl b/scripts/changelog/debian.pl index e90373a8..a00a29fe 100755 --- a/scripts/changelog/debian.pl +++ b/scripts/changelog/debian.pl @@ -124,3 +124,6 @@ if ($file eq '-') { eval("print \$changes->${format}_str(\$opts)"); +if ($@) { + failure("%s",$@); +} -- 2.39.5