From 99313ebc6c3779f692f9f1bd70cc69a236f5eb78 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 31 Jul 2008 06:24:45 -0400 Subject: 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. --- xml.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xml.cc') diff --git a/xml.cc b/xml.cc index 562dcf7e..297b710a 100644 --- a/xml.cc +++ b/xml.cc @@ -209,7 +209,7 @@ 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_error(err.what()); } if (! have_error.empty()) { @@ -223,7 +223,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_error(err); } } -- cgit v1.2.3