| 38 | } |
| 39 | |
| 40 | ExpressionResult Expression::Evaluate(ScriptFrame& frame, DebugHint *dhint) const |
| 41 | { |
| 42 | try { |
| 43 | #ifdef I2_DEBUG |
| 44 | /* std::ostringstream msgbuf; |
| 45 | ShowCodeLocation(msgbuf, GetDebugInfo(), false); |
| 46 | Log(LogDebug, "Expression") |
| 47 | << "Executing:\n" << msgbuf.str();*/ |
| 48 | #endif /* I2_DEBUG */ |
| 49 | |
| 50 | frame.IncreaseStackDepth(); |
| 51 | |
| 52 | Defer decreaseStackDepth([&frame]{ |
| 53 | frame.DecreaseStackDepth(); |
| 54 | }); |
| 55 | |
| 56 | ExpressionResult result = DoEvaluate(frame, dhint); |
| 57 | return result; |
| 58 | } catch (ScriptError& ex) { |
| 59 | ScriptBreakpoint(frame, &ex, GetDebugInfo()); |
| 60 | throw; |
| 61 | } catch (const std::exception& ex) { |
| 62 | BOOST_THROW_EXCEPTION(ScriptError("Error while evaluating expression: " + String(ex.what()), GetDebugInfo()) |
| 63 | << boost::errinfo_nested_exception(boost::current_exception())); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | bool Expression::GetReference(ScriptFrame&, [[maybe_unused]] bool init_dict, [[maybe_unused]] Value* parent, [[maybe_unused]] String* index, DebugHint**) const |
| 68 | { |
no test coverage detected