diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-31 06:24:45 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-31 06:24:45 -0400 |
commit | 99313ebc6c3779f692f9f1bd70cc69a236f5eb78 (patch) | |
tree | 44a553891a9aaa148084d8e011b2d326401343e9 /qif.cc | |
parent | 8afd926a27af55862ce360970e05d747f249a0da (diff) | |
download | fork-ledger-99313ebc6c3779f692f9f1bd70cc69a236f5eb78.tar.gz fork-ledger-99313ebc6c3779f692f9f1bd70cc69a236f5eb78.tar.bz2 fork-ledger-99313ebc6c3779f692f9f1bd70cc69a236f5eb78.zip |
Revised the way that exceptions are thrown around. Instead of context being a
complicated string of pointers, it's now just a global block of text that gets
appended to as the error is being thrown up, and can be displayed at the catch
point if desired. There are almost no cases where a thrown exception will not
result in an error message being displayed to the user.
Diffstat (limited to 'qif.cc')
-rw-r--r-- | qif.cc | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -75,7 +75,7 @@ unsigned int qif_parser_t::parse(std::istream& in, case '\t': if (peek_next_nonws(in) != '\n') { get_line(in); - throw new parse_error("Line begins with whitespace"); + throw parse_error("Line begins with whitespace"); } // fall through... @@ -92,8 +92,7 @@ unsigned int qif_parser_t::parse(std::istream& in, std::strcmp(line, "Type:Cat") == 0 || std::strcmp(line, "Type:Class") == 0 || std::strcmp(line, "Type:Memorized") == 0) - throw new parse_error(string("QIF files of type ") + line + - " are not supported."); + throw_(parse_error, "QIF files of type " << line << " are not supported."); break; case 'D': |