diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/format.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/format.cc b/src/format.cc index bde39882..ae40e1c3 100644 --- a/src/format.cc +++ b/src/format.cc @@ -362,8 +362,13 @@ string format_t::real_calc(scope_t& scope) out << value.to_string(); } catch (const calc_error&) { + string current_context = error_context(); + add_error_context(_("While calculating format expression:")); add_error_context(expr.context_to_str()); + + if (! current_context.empty()) + add_error_context(current_context); throw; } break; |