Commit ae79f02d authored by Robert Ricci's avatar Robert Ricci

There should _NOT_ be die()s in the modules, as this prevents

things from getting cleaned up on failure.
parent 9bd1dded
......@@ -352,7 +352,8 @@ sub vlanUnlock($;$) {
$RetVal = $self->{SESS}->set([[$EditOp,1,"release","INTEGER"]]);
$self->debug("Release: '$RetVal'\n");
if (! $RetVal ) {
die("VLAN Reconfiguration Failed. No changes saved.\n");
warn("VLAN Reconfiguration Failed. No changes saved.\n");
return 0;
}
}
} else {
......@@ -360,7 +361,8 @@ sub vlanUnlock($;$) {
# If I succeed, release buffer
$RetVal = $self->{SESS}->set([[$EditOp,1,"release","INTEGER"]]);
if (! $RetVal ) {
die("VLAN Reconfiguration Failed. No changes saved.\n");
warn("VLAN Reconfiguration Failed. No changes saved.\n");
return 0;
}
$self->debug("Release: '$RetVal'\n");
}
......
......@@ -318,7 +318,8 @@ sub vlanUnlock($;$) {
# Make sure the confirmation was confirmed
#
if ($RetVal ne "confirmedNewConf") {
die("VLAN Reconfiguration Failed. No changes saved.\n");
warn("VLAN Reconfiguration Failed ($RetVal). No changes saved.\n");
return 0;
}
} else { # if $self->{CONFIRM}
......@@ -326,7 +327,8 @@ sub vlanUnlock($;$) {
# Just check the return value
#
if ($RetVal ne 'success') {
die("VLAN Reconfiguration Failed: $RetVal. No changes saved.\n");
warn("VLAN Reconfiguration Failed: $RetVal. No changes saved.\n");
return 0;
}
}
}
......
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