mirror of
https://github.com/Icinga/icinga2.git
synced 2026-06-10 17:21:03 -04:00
Merge 85f8839af1 into f63bbec4ab
This commit is contained in:
commit
fd212c3a7b
1 changed files with 9 additions and 3 deletions
|
|
@ -39,6 +39,8 @@ void Expression::ScriptBreakpoint(ScriptFrame& frame, ScriptError *ex, const Deb
|
|||
|
||||
ExpressionResult Expression::Evaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
{
|
||||
ExpressionResult result (Empty);
|
||||
|
||||
try {
|
||||
#ifdef I2_DEBUG
|
||||
/* std::ostringstream msgbuf;
|
||||
|
|
@ -49,11 +51,15 @@ ExpressionResult Expression::Evaluate(ScriptFrame& frame, DebugHint *dhint) cons
|
|||
|
||||
frame.IncreaseStackDepth();
|
||||
|
||||
Defer decreaseStackDepth([&frame]{
|
||||
try {
|
||||
result = DoEvaluate(frame, dhint);
|
||||
} catch (...) {
|
||||
frame.DecreaseStackDepth();
|
||||
});
|
||||
throw;
|
||||
}
|
||||
|
||||
frame.DecreaseStackDepth();
|
||||
|
||||
ExpressionResult result = DoEvaluate(frame, dhint);
|
||||
return result;
|
||||
} catch (ScriptError& ex) {
|
||||
ScriptBreakpoint(frame, &ex, GetDebugInfo());
|
||||
|
|
|
|||
Loading…
Reference in a new issue