summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-02-13 10:01:53 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-02-13 10:01:53 +0000
commit28c0175b62e3157bcb1045e0b1abee1f91b653c7 (patch)
treeb2e548f32146bbb24624eefd981a8ea1ef5e428f
parent65a65a26ae6b419f0bd8a06dd043e14b10e22a07 (diff)
downloadATCD-28c0175b62e3157bcb1045e0b1abee1f91b653c7.tar.gz
Tue Feb 13 08:10:14 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/XML_Loader.cpp38
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/XML_Loader.h5
2 files changed, 20 insertions, 23 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.cpp b/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.cpp
index f8525cf71b1..433d57d7d64 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.cpp
@@ -92,19 +92,17 @@ namespace TAO_Notify
parser.setErrorHandler (this);
parser.setEntityResolver (this);
- ACEXML_TRY_NEW_ENV
+ try
{
- parser.parse (&input ACEXML_ENV_ARG_PARAMETER);
- ACEXML_TRY_CHECK;
+ parser.parse (&input);
}
- ACEXML_CATCH (ACEXML_Exception, ex)
+ catch (const ACEXML_Exception& ex)
{
// The only way to find out what it is, it to let it print itself, so...
ACE_ERROR ((LM_ERROR, "Unable to load \"%s\".\n Will try backup file.\n", this->file_name_.c_str ()));
ex.print ();
result = false;
}
- ACEXML_ENDTRY;
}
else
{
@@ -143,7 +141,7 @@ namespace TAO_Notify
parser.setErrorHandler (this);
parser.setEntityResolver (this);
- ACEXML_TRY_NEW_ENV
+ try
{
object_stack_.push (root);
parser.parse (&input ACEXML_ENV_ARG_PARAMETER);
@@ -152,14 +150,13 @@ namespace TAO_Notify
Topology_Object* cur;
object_stack_.pop (cur);
}
- ACEXML_CATCH (ACEXML_Exception, ex)
+ catch (const ACEXML_Exception& ex)
{
// The only way to find out what it is, it to let it print itself, so...
ACE_ERROR ((LM_ERROR, "Unable to load \"%s\".\n", this->file_name_.c_str ()));
ex.print ();
throw CORBA::INTERNAL();
}
- ACEXML_ENDTRY;
}
else
{
@@ -172,8 +169,8 @@ namespace TAO_Notify
XML_Loader::startElement (const ACEXML_Char*,
const ACEXML_Char*,
const ACEXML_Char* name,
- ACEXML_Attributes* xml_attrs ACEXML_ENV_ARG_DECL)
- ACE_THROW_SPEC ( (ACEXML_SAXException))
+ ACEXML_Attributes* xml_attrs)
+ throw (ACEXML_SAXException)
{
ACE_ASSERT (name != 0);
ACE_ASSERT (xml_attrs != 0);
@@ -194,14 +191,13 @@ namespace TAO_Notify
));
ACE_CString cname (name);
- Topology_Object* next = cur->load_child (
- cname, id, attrs);
+ Topology_Object* next = cur->load_child (cname, id, attrs);
ACE_ASSERT(next != 0);
object_stack_.push (next);
}
catch (const CORBA::Exception& ex)
{
- ACEXML_THROW (ACEXML_SAXException (ex._info ().c_str ()));
+ throw ACEXML_SAXException (ex._info ().c_str ());
}
}
}
@@ -210,18 +206,20 @@ namespace TAO_Notify
void
XML_Loader::endElement (const ACEXML_Char*,
const ACEXML_Char*,
- const ACEXML_Char* name ACEXML_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((ACEXML_SAXException))
+ const ACEXML_Char* name)
+ throw (ACEXML_SAXException)
{
ACE_UNUSED_ARG (name);
if (this->live_)
{
ACE_ASSERT (object_stack_.size () > 0);
- if (DEBUG_LEVEL > 5) ACE_DEBUG ((LM_INFO,
- ACE_TEXT("(%P|%t) XML_Loader: End Element %s\n"),
- name
- ));
- Topology_Object* cur;
+ if (DEBUG_LEVEL > 5)
+ {
+ ACE_DEBUG ((LM_INFO,
+ ACE_TEXT("(%P|%t) XML_Loader: End Element %s\n"),
+ name));
+ }
+ Topology_Object* cur = 0;
object_stack_.pop (cur);
}
}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.h b/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.h
index 17707a94b01..e2a1a967128 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/XML_Loader.h
@@ -59,13 +59,12 @@ public:
const ACEXML_Char* localName,
const ACEXML_Char* qName,
ACEXML_Attributes* atts ACEXML_ENV_ARG_DECL)
- ACE_THROW_SPEC ((ACEXML_SAXException));
+ throw (ACEXML_SAXException);
virtual void endElement (const ACEXML_Char*,
const ACEXML_Char*,
const ACEXML_Char* name ACEXML_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((ACEXML_SAXException));
-
+ throw (ACEXML_SAXException);
private:
/// The name of the file from which data is read.