From: Ian Jackson Date: Fri, 13 Apr 2018 13:20:13 +0000 (+0100) Subject: ms-planner*: Improve debugging a bit X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=db64c9f1aac04ece3e7c74fbe071181f72c41185;p=people%2Fiwj%2Fosstest.git ms-planner*: Improve debugging a bit * Use confess a few times instead of die * Fix failure of ms-planner-debug to DTRT Signed-off-by: Ian Jackson --- diff --git a/ms-planner b/ms-planner index 2b8b6c2e..e56f0ea7 100755 --- a/ms-planner +++ b/ms-planner @@ -487,9 +487,9 @@ sub parse_xinfo ($$) { sub parse_number ($) { my ($num) = @_; - die unless defined $num; - die if ref $num; - die unless $num =~ m/^(0|[1-9][0-9]{0,8})$/; + confess unless defined $num; + confess if ref $num; + confess unless $num =~ m/^(0|[1-9][0-9]{0,8})$/; return $num + 0; } diff --git a/ms-planner-debug b/ms-planner-debug index c82666d1..71540779 100755 --- a/ms-planner-debug +++ b/ms-planner-debug @@ -52,7 +52,7 @@ foreach my $arg (@ARGV) { print "==========data-$walker.pl==========\n"; -system 'cat data-$walker.pl 2>&1'; +system "cat data-$walker.pl 2>&1"; print "==========resources==========\n";