From a20df95a2b4614745fff9ea1621b1f613f6413f3 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 10 Nov 2017 13:16:41 +0100 Subject: Fixed exception throwing * ACE/ACEXML/parser/parser/Parser.cpp: --- ACE/ACEXML/parser/parser/Parser.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'ACE/ACEXML') diff --git a/ACE/ACEXML/parser/parser/Parser.cpp b/ACE/ACEXML/parser/parser/Parser.cpp index 21aae9dbdd2..385ba540c55 100644 --- a/ACE/ACEXML/parser/parser/Parser.cpp +++ b/ACE/ACEXML/parser/parser/Parser.cpp @@ -199,7 +199,6 @@ ACEXML_Parser::parse (ACEXML_InputSource *input) // Reset the parser state this->reset(); - } int @@ -2644,8 +2643,7 @@ ACEXML_Parser::getProperty (const ACEXML_Char *name) } void -ACEXML_Parser::setProperty (const ACEXML_Char *name, - void *) +ACEXML_Parser::setProperty (const ACEXML_Char *name, void *) { throw ACEXML_SAXNotSupportedException (name); } @@ -2653,36 +2651,29 @@ ACEXML_Parser::setProperty (const ACEXML_Char *name, void ACEXML_Parser::error (const ACEXML_Char* msg) { - ACEXML_SAXParseException* exception = 0; - ACE_NEW_NORETURN (exception, ACEXML_SAXParseException (msg)); + ACEXML_SAXParseException exception(msg); if (this->error_handler_) - this->error_handler_->error (*exception); + this->error_handler_->error (exception); else throw exception; - return; } void ACEXML_Parser::warning (const ACEXML_Char* msg) { - ACEXML_SAXParseException* exception = 0; - ACE_NEW_NORETURN (exception, ACEXML_SAXParseException (msg)); + ACEXML_SAXParseException exception(msg); if (this->error_handler_) - this->error_handler_->warning (*exception); - delete exception; - return; + this->error_handler_->warning (exception); } void ACEXML_Parser::fatal_error (const ACEXML_Char* msg) { - ACEXML_SAXParseException* exception = 0; - ACE_NEW_NORETURN (exception, ACEXML_SAXParseException (msg)); + ACEXML_SAXParseException exception(msg); if (this->error_handler_) - this->error_handler_->fatalError (*exception); + this->error_handler_->fatalError (exception); this->reset(); throw exception; - return; } void -- cgit v1.2.1