summaryrefslogtreecommitdiff
path: root/ACE/ACEXML
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2017-11-10 13:16:41 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2017-11-10 13:16:41 +0100
commita20df95a2b4614745fff9ea1621b1f613f6413f3 (patch)
tree4339a720d84519fa69296717a63ce908a9493a73 /ACE/ACEXML
parent9d0b2ea258f08682b47ab64abb4fe58f87903579 (diff)
downloadATCD-a20df95a2b4614745fff9ea1621b1f613f6413f3.tar.gz
Fixed exception throwing
* ACE/ACEXML/parser/parser/Parser.cpp:
Diffstat (limited to 'ACE/ACEXML')
-rw-r--r--ACE/ACEXML/parser/parser/Parser.cpp23
1 files changed, 7 insertions, 16 deletions
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