From 0bb9c110624edab2cbde1709d69e38761a7b9fd0 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 13 Jun 2010 03:52:20 -0400 Subject: Changed display order of format exceptions --- src/format.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/format.cc') 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; -- cgit v1.2.3