Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
e3a37feb
Commit
e3a37feb
authored
Dec 02, 2011
by
Leigh B Stoller
Browse files
Use a SIGWARN trick to capture error output from VirtExperiment->Store().
parent
64b7a579
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCM.pm.in
View file @
e3a37feb
...
...
@@ -1718,9 +1718,21 @@ sub GetTicketAuxAux($$$$$$$$$)
}
skiplinks
:
$
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
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment