diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-02 15:16:18 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-02 15:16:18 -0400 |
commit | cf9b4a38739426e4993fac49798ebe7dcfa11d62 (patch) | |
tree | dfd7e8afc40eaf6cf829026709771f5e32e62740 /src/textual.cc | |
parent | b18214372e42f84cd3c3b4ecfce8bb0295e6f9ca (diff) | |
download | ledger-cf9b4a38739426e4993fac49798ebe7dcfa11d62.tar.gz ledger-cf9b4a38739426e4993fac49798ebe7dcfa11d62.tar.bz2 ledger-cf9b4a38739426e4993fac49798ebe7dcfa11d62.zip |
Removed report_error() function and reordered context for parsing errors.
Diffstat (limited to 'src/textual.cc')
-rw-r--r-- | src/textual.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/textual.cc b/src/textual.cc index b701233f..1be5d4d8 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -190,6 +190,8 @@ void textual_parser_t::instance_t::parse() beg_line = linenum; } catch (const std::exception& err) { + string current_context = error_context(); + if (parent) { std::list<instance_t *> instances; @@ -206,7 +208,9 @@ void textual_parser_t::instance_t::parse() add_error_context("While parsing file " << file_context(pathname, linenum - 1)); - report_error(err); + std::cerr << error_context() << std::endl + << current_context << std::endl + << "Error: " << err.what() << std::endl; errors++; } } |