summaryrefslogtreecommitdiff
path: root/xmlparse.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 /xmlparse.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 'xmlparse.cc')
-rw-r--r--xmlparse.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/xmlparse.cc b/xmlparse.cc
index bcd6cefb..35d26e5a 100644
--- a/xmlparse.cc
+++ b/xmlparse.cc
@@ -207,13 +207,16 @@ unsigned int xml_parser_t::parse(std::istream& in,
catch (const std::exception& err) {
//unsigned long line = XML_GetCurrentLineNumber(parser) - offset++;
XML_ParserFree(parser);
- throw new parse_error(err.what());
+ throw_(parse_exception, err.what());
}
if (! have_error.empty()) {
//unsigned long line = XML_GetCurrentLineNumber(parser) - offset++;
+#if 0
+ // jww (2007-04-26): What is this code doing?
parse_error err(have_error);
std::cerr << "Error: " << err.what() << std::endl;
+#endif
have_error = "";
}
@@ -221,7 +224,7 @@ unsigned int xml_parser_t::parse(std::istream& in,
//unsigned long line = XML_GetCurrentLineNumber(parser) - offset++;
const char * err = XML_ErrorString(XML_GetErrorCode(parser));
XML_ParserFree(parser);
- throw new parse_error(err);
+ throw_(parse_exception, err);
}
}