Fixed error context output.
This commit is contained in:
parent
c5795c66c9
commit
6983e6a38a
2 changed files with 4 additions and 4 deletions
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue