summaryrefslogtreecommitdiff
path: root/qif.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-27 10:08:42 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:31 -0400
commit0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f (patch)
tree750d64f6817282a6f4744058f73164a2996f6b03 /qif.cc
parentd01629148383261d7944e91fd2ac67b334a6834d (diff)
downloadfork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.tar.gz
fork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.tar.bz2
fork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.zip
Restructured the code to use the new utility code in utils.h.
Diffstat (limited to 'qif.cc')
-rw-r--r--qif.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/qif.cc b/qif.cc
index cc0b3daa..5e567ea0 100644
--- a/qif.cc
+++ b/qif.cc
@@ -56,8 +56,8 @@ unsigned int qif_parser_t::parse(std::istream& in,
src_idx = journal->sources.size() - 1;
linenum = 1;
- istream_pos_type beg_pos = 0;
- unsigned long beg_line = 0;
+ unsigned long beg_pos = 0;
+ unsigned long beg_line = 0;
#define SET_BEG_POS_AND_LINE() \
if (! beg_line) { \
@@ -73,7 +73,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_exception, "Line begins with whitespace");
}
// fall through...
@@ -90,8 +90,8 @@ 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_exception,
+ "QIF files of type " << line << " are not supported.");
break;
case 'D':