X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=lib%2FUtils.pm;h=ea189a12898537405dc531b90530799b8b2ceb29;hb=44aaba558b2244c52c99d5a4bc50cae05c4ed514;hp=9cb99e31dc62618e2b9ba4662b296e06b475cd4d;hpb=ae9e57b169de143d2b8a7c761c3bf7394385e0d0;p=clearscm.git diff --git a/lib/Utils.pm b/lib/Utils.pm index 9cb99e3..ea189a1 100644 --- a/lib/Utils.pm +++ b/lib/Utils.pm @@ -104,9 +104,11 @@ sub CheckParms($$) { my $msg = RequiredFields($requiredFields, $rec); - my $function = (caller(1))[3]; + my $function = (caller(1))[3]; + my $calledFrom = (caller(2))[3]; + my $lineNbr = (caller(2))[2]; - croak "Internal error: $function: $msg" if $msg; + croak "Internal error: $function called from $calledFrom:$lineNbr\n\nThe field $msg" if $msg; return; } # CheckParms @@ -255,7 +257,7 @@ STDOUT then do so in the $command passed in. chomp @output; - wantarray ? return ($status, @output) : $status; + return wantarray ? ($status, @output) : $status; } # Execute sub GetChildren(;$) { @@ -804,6 +806,8 @@ Returns: print $out "$_\n"; } # for + close $out; + return; } # RedirectOutput