[carton] 291/472: wrap errors with eval

Lucas Kanashiro kanashiro-guest at moszumanska.debian.org
Fri Jul 24 00:38:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

kanashiro-guest pushed a commit to branch master
in repository carton.

commit 68f4fa7e3d51d0a590b58b5cf2fa52405ee9cf92
Author: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
Date:   Wed Jun 5 18:02:41 2013 +0900

    wrap errors with eval
---
 xt/CLI.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xt/CLI.pm b/xt/CLI.pm
index 502ea2e..8186cf0 100644
--- a/xt/CLI.pm
+++ b/xt/CLI.pm
@@ -32,8 +32,8 @@ sub run {
     my $pushd = File::pushd::pushd $self->dir;
 
     my @capture = capture {
-        my $code = $self->SUPER::run(@args);
-        $self->exit_code($code);
+        my $code = eval { $self->SUPER::run(@args) };
+        $self->exit_code($@ ? 255 : $code);
     };
 
     $self->stdout($capture[0]);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/carton.git



More information about the Pkg-perl-cvs-commits mailing list