This is an automated email from the git hooks/post-receive script. dod pushed a commit to branch master in repository libconfig-model-dpkg-perl.
commit d35bdbf6aca86fda849bc85dd93686f7210abc55 Author: Dominique Dumont <d...@debian.org> Date: Sun Feb 28 18:57:41 2016 +0100 Fixed syntax error message of Patch parser --- lib/Config/Model/Backend/Dpkg.pm | 5 +++-- lib/Config/Model/Backend/Dpkg/Patch.pm | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/Config/Model/Backend/Dpkg.pm b/lib/Config/Model/Backend/Dpkg.pm index 0bebccb..1243c87 100644 --- a/lib/Config/Model/Backend/Dpkg.pm +++ b/lib/Config/Model/Backend/Dpkg.pm @@ -53,8 +53,9 @@ sub read_patch_series { my $e = $@; if (ref($e) and $e ->isa('Config::Model::Exception::Syntax')) { if ( $args->{check} eq 'yes' ) { - my $msg = $e ->message. ". Use -force option to override" ; - ref($e) -> throw(message => $msg); + my $msg = $e ->message; + $e->message($msg. ". Use -force option to override" ); + $e -> rethrow(); } else { warn "Warning: Ignoring patch $pname: ", $e->message,"\n"; diff --git a/lib/Config/Model/Backend/Dpkg/Patch.pm b/lib/Config/Model/Backend/Dpkg/Patch.pm index 3d28442..69078cd 100644 --- a/lib/Config/Model/Backend/Dpkg/Patch.pm +++ b/lib/Config/Model/Backend/Dpkg/Patch.pm @@ -82,8 +82,7 @@ sub read { $c = eval { $self->parse_dpkg_lines( $header, $check, 0, $store_stuff ); }; my $e = $@; if ( ref($e) and $e->isa('Config::Model::Exception::Syntax') ) { - # FIXME: this is naughty. Should file a bug to add info in rethrow - $e->{parsed_file} = $patch_file unless $e->parsed_file; + $e->parsed_file( $patch_file ); $e->rethrow; } elsif (ref($e)) { @@ -94,7 +93,9 @@ sub read { } Config::Model::Exception::Syntax->throw( - message => "More than 2 sections in $patch_name header" ) + message => "More than 2 sections in $patch_name header", + parsed_file => $patch_file, + ) if @$c > 4; # $c contains [ line_nb, section_ref ] } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits