From 0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 27 Apr 2007 10:08:42 +0000 Subject: Restructured the code to use the new utility code in utils.h. --- xmlparse.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xmlparse.cc') 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); } } -- cgit v1.2.3