summaryrefslogtreecommitdiff
path: root/TAO/tao/Connector_Registry.cpp
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>1999-07-02 03:05:25 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>1999-07-02 03:05:25 +0000
commitf91a3f1d720b787a17cc2b2494da948a8f464eda (patch)
tree0f516c275cede28a3bd86e8729b95c6d20669ea9 /TAO/tao/Connector_Registry.cpp
parent033fb4465c31c60e45559dd2c6f4f6766935944e (diff)
downloadATCD-f91a3f1d720b787a17cc2b2494da948a8f464eda.tar.gz
Exception handling fixes. Exception handling code was working
but it was based on old code that needed updating. Corrected exceptions that get thrown. CORBA::string_to_object() is supposed to throw an INV_OBJREF system exception. The methods that were fixed all get called when CORBA::string_to_object() is called.
Diffstat (limited to 'TAO/tao/Connector_Registry.cpp')
-rw-r--r--TAO/tao/Connector_Registry.cpp37
1 files changed, 26 insertions, 11 deletions
diff --git a/TAO/tao/Connector_Registry.cpp b/TAO/tao/Connector_Registry.cpp
index 047071d613a..7c99e12549f 100644
--- a/TAO/tao/Connector_Registry.cpp
+++ b/TAO/tao/Connector_Registry.cpp
@@ -134,8 +134,12 @@ TAO_Connector_Registry::make_mprofile (const char *ior,
{
if (!ior)
// Failure: Null IOR string pointer
- ACE_THROW_RETURN (CORBA::MARSHAL (),
- -1);
+ ACE_THROW_RETURN (CORBA::INV_OBJREF (
+ CORBA_SystemException::_tao_minor_code (
+ TAO_NULL_POINTER_MINOR_CODE,
+ 0),
+ CORBA::COMPLETED_NO),
+ -1);
TAO_ConnectorSetItor first_connector =
this->connectors_.begin ();
@@ -148,22 +152,33 @@ TAO_Connector_Registry::make_mprofile (const char *ior,
{
if (*connector)
{
- if ((*connector)->make_mprofile (ior,
- mprofile,
- ACE_TRY_ENV) == 0)
- // Success.
- return 0;
+ int mp_result = (*connector)->make_mprofile (ior,
+ mprofile,
+ ACE_TRY_ENV);
+
+ ACE_CHECK_RETURN (mp_result);
+
+ if (mp_result == 0)
+ return 0; // Success
}
else
// Failure: Null pointer to connector in connector registry.
- ACE_THROW_RETURN (CORBA::MARSHAL (),
- -1);
+ ACE_THROW_RETURN (CORBA::INV_OBJREF (
+ CORBA_SystemException::_tao_minor_code (
+ TAO_NULL_POINTER_MINOR_CODE,
+ 0),
+ CORBA::COMPLETED_NO),
+ -1);
}
// Failure: None of the connectors were able to parse the URL style
// IOR into an MProfile.
- ACE_THROW_RETURN (CORBA::MARSHAL (),
- -1);
+ ACE_THROW_RETURN (CORBA::INV_OBJREF (
+ CORBA_SystemException::_tao_minor_code (
+ TAO_CONNECTOR_REGISTRY_NO_USABLE_PROTOCOL,
+ 0),
+ CORBA::COMPLETED_NO),
+ -1);
}
TAO_Profile *