diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-02 00:24:26 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-02 00:24:26 -0400 |
commit | 9540406af15d522d15c94cc3d63c77b7da7e1423 (patch) | |
tree | 6dd912aac2adb018c16a8b506bc0e18eb8444caa /src/format.cc | |
parent | ef3943c60498ab0fd4de1f1735109b0d103c167a (diff) | |
download | fork-ledger-9540406af15d522d15c94cc3d63c77b7da7e1423.tar.gz fork-ledger-9540406af15d522d15c94cc3d63c77b7da7e1423.tar.bz2 fork-ledger-9540406af15d522d15c94cc3d63c77b7da7e1423.zip |
Simplified error context handling.
Diffstat (limited to 'src/format.cc')
-rw-r--r-- | src/format.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/format.cc b/src/format.cc index 79ec2c0c..eeaf6fe4 100644 --- a/src/format.cc +++ b/src/format.cc @@ -298,7 +298,8 @@ void format_t::format(std::ostream& out_str, scope_t& scope) value.strip_annotations().dump(out, elem->min_width); } catch (const calc_error&) { - out << (string("%") + elem->chars); + add_error_context("While calculating format expression:"); + add_error_context(expr_context(elem->expr)); throw; } break; |