diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-31 01:21:24 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-31 01:21:30 -0400 |
commit | 6983e6a38a6d06fd82667301940c976d56cb7ed1 (patch) | |
tree | 0c6fbdc936419b723da4313c0b730bce266a73fe /src | |
parent | c5795c66c9044c347332812498b888787e0edd4a (diff) | |
download | fork-ledger-6983e6a38a6d06fd82667301940c976d56cb7ed1.tar.gz fork-ledger-6983e6a38a6d06fd82667301940c976d56cb7ed1.tar.bz2 fork-ledger-6983e6a38a6d06fd82667301940c976d56cb7ed1.zip |
Fixed error context output.
Diffstat (limited to 'src')
-rw-r--r-- | src/entry.cc | 4 | ||||
-rw-r--r-- | src/textual.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/entry.cc b/src/entry.cc index 09e2647a..9749b1df 100644 --- a/src/entry.cc +++ b/src/entry.cc @@ -228,10 +228,10 @@ bool entry_base_t::finalize() if (! balance.is_null() && ! balance.is_zero()) { #if 0 - new entry_context(*this, "While balancing entry:"); + add_error_context(entry_context(*this)); #endif add_error_context("Unbalanced remainder is: "); - add_error_context(value_context(balance)); + add_error_context(value_context(balance.unround())); throw_(balance_error, "Entry does not balance"); } diff --git a/src/textual.cc b/src/textual.cc index 55e13445..527d49af 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -198,8 +198,8 @@ void textual_parser_t::instance_t::parse() << file_context(instance->pathname, instance->linenum - 1) << "':"); } - add_error_context("While parsing file '" - << file_context(pathname, linenum - 1) << "':"); + add_error_context("While parsing file " + << file_context(pathname, linenum - 1) << "\n"); std::cout.flush(); std::cerr << ledger::error_context() |