diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-13 03:52:20 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-13 03:52:20 -0400 |
commit | 0bb9c110624edab2cbde1709d69e38761a7b9fd0 (patch) | |
tree | c7c0db12aad4e614929a6a8dbf0c03ccf1a3ef0b /src/format.cc | |
parent | 0ed85124d9d3cbf607303e31802c96799ea03042 (diff) | |
download | fork-ledger-0bb9c110624edab2cbde1709d69e38761a7b9fd0.tar.gz fork-ledger-0bb9c110624edab2cbde1709d69e38761a7b9fd0.tar.bz2 fork-ledger-0bb9c110624edab2cbde1709d69e38761a7b9fd0.zip |
Changed display order of format exceptions
Diffstat (limited to 'src/format.cc')
-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; |