diff options
Diffstat (limited to 'src/expr.cc')
-rw-r--r-- | src/expr.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/expr.cc b/src/expr.cc index f3a30de6..62058e0b 100644 --- a/src/expr.cc +++ b/src/expr.cc @@ -78,6 +78,8 @@ value_t expr_t::real_calc(scope_t& scope) } catch (const std::exception& err) { if (locus) { + string current_context = error_context(); + add_error_context(_("While evaluating value expression:")); add_error_context(op_context(ptr, locus)); @@ -103,6 +105,9 @@ value_t expr_t::real_calc(scope_t& scope) } add_error_context(out.str()); } + + if (! current_context.empty()) + add_error_context(current_context); } throw; } |