Commit e3a37feb authored by Leigh B Stoller's avatar Leigh B Stoller

Use a SIGWARN trick to capture error output from VirtExperiment->Store().

parent 64b7a579
...@@ -1718,9 +1718,21 @@ sub GetTicketAuxAux($$$$$$$$$) ...@@ -1718,9 +1718,21 @@ sub GetTicketAuxAux($$$$$$$$$)
} }
skiplinks: skiplinks:
$virtexperiment->Dump(); $virtexperiment->Dump();
if ($virtexperiment->Store()) { {
$response = GeniResponse->Create(GENIRESPONSE_ERROR, undef); #
goto bad; # Want to capture this output and return to user.
#
my $warnings = "";
local $SIG{__WARN__} = sub { $warnings .= $_[0] };
if ($virtexperiment->Store()) {
print STDERR $warnings
if ($warnings ne "");
$response = GeniResponse->Create(GENIRESPONSE_ERROR,
undef, $warnings);
goto bad;
}
} }
# Must chdir to the work directory for the mapper. # Must chdir to the work directory for the mapper.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment