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,10 +1718,22 @@ sub GetTicketAuxAux($$$$$$$$$)
}
skiplinks:
$virtexperiment->Dump();
{
#
# Want to capture this output and return to user.
#
my $warnings = "";
local $SIG{__WARN__} = sub { $warnings .= $_[0] };
if ($virtexperiment->Store()) {
$response = GeniResponse->Create(GENIRESPONSE_ERROR, undef);
print STDERR $warnings
if ($warnings ne "");
$response = GeniResponse->Create(GENIRESPONSE_ERROR,
undef, $warnings);
goto bad;
}
}
# Must chdir to the work directory for the mapper.
if (! chdir($slice_experiment->WorkDir())) {
......
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