diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 12 | ||||
-rw-r--r-- | cpp/src/Ice/LocatorInfo.cpp | 8 | ||||
-rw-r--r-- | cpp/src/Ice/ObjectAdapterI.cpp | 4 | ||||
-rw-r--r-- | cpp/src/IcePack/LocatorI.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IcePack/LocatorRegistryI.cpp | 4 | ||||
-rw-r--r-- | cpp/src/IceUtil/Exception.cpp | 11 |
6 files changed, 37 insertions, 4 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 7f95182d365..614803f09a7 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -57,6 +57,13 @@ IceUtil::Mutex* Instance::_globalStateMutex = new IceUtil::Mutex; string Instance::_identForOpenlog; #endif +namespace IceUtil +{ + +extern bool nullHandleAbort; + +}; + namespace IceInternal { @@ -299,6 +306,11 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, int& argc, } openlog(_identForOpenlog.c_str(), LOG_PID, LOG_USER); } + + if(_properties->getPropertyAsInt("Ice.NullHandleAbort") > 0) + { + IceUtil::nullHandleAbort = true; + } #endif } diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp index 174fb756d3a..958678f93ca 100644 --- a/cpp/src/Ice/LocatorInfo.cpp +++ b/cpp/src/Ice/LocatorInfo.cpp @@ -249,6 +249,14 @@ IceInternal::LocatorInfo::getEndpoints(const ReferencePtr& ref, bool& cached) endpoints = object->__reference()->endpoints; } } + catch(const AdapterNotRegisteredException&) + { + if(ref->instance->traceLevels()->location >= 1) + { + Trace out(ref->instance->logger(), ref->instance->traceLevels()->locationCat); + out << "adapter `" << ref->adapterId << "' is not registered"; + } + } catch(const LocalException& ex) { // diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index cdc3f5d4535..5504ded919e 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -84,13 +84,13 @@ Ice::ObjectAdapterI::activate() { _locatorInfo->getLocatorRegistry()->setAdapterDirectProxy(_id, newDirectProxy(ident)); } - catch(const Ice::AdapterNotRegistered&) + catch(const Ice::AdapterNotRegisteredException&) { ObjectAdapterNotRegisteredException ex(__FILE__, __LINE__); ex.name = _name; throw ex; } - catch(const Ice::AdapterAlreadyActive&) + catch(const Ice::AdapterAlreadyActiveException&) { ObjectAdapterIdInUseException ex(__FILE__, __LINE__); ex.id = _id; diff --git a/cpp/src/IcePack/LocatorI.cpp b/cpp/src/IcePack/LocatorI.cpp index ab2822d7fbf..57af5cf4a48 100644 --- a/cpp/src/IcePack/LocatorI.cpp +++ b/cpp/src/IcePack/LocatorI.cpp @@ -44,12 +44,14 @@ IcePack::LocatorI::findAdapterById(const string& id, const Ice::Current&) const } catch(const AdapterNotExistException&) { + throw Ice::AdapterNotRegisteredException(); } catch(const Ice::ObjectNotExistException&) { // // Expected if the adapter is destroyed. // + throw Ice::AdapterNotRegisteredException(); } catch(const Ice::NoEndpointException&) { diff --git a/cpp/src/IcePack/LocatorRegistryI.cpp b/cpp/src/IcePack/LocatorRegistryI.cpp index c6e05275832..78e56f94e2c 100644 --- a/cpp/src/IcePack/LocatorRegistryI.cpp +++ b/cpp/src/IcePack/LocatorRegistryI.cpp @@ -43,7 +43,7 @@ IcePack::LocatorRegistryI::setAdapterDirectProxy(const string& id, const Ice::Ob } catch(const AdapterActiveException&) { - throw Ice::AdapterAlreadyActive(); + throw Ice::AdapterAlreadyActiveException(); } catch(const Ice::ObjectNotExistException&) { @@ -96,7 +96,7 @@ IcePack::LocatorRegistryI::setAdapterDirectProxy(const string& id, const Ice::Ob } else { - throw Ice::AdapterNotRegistered(); + throw Ice::AdapterNotRegisteredException(); } } } diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp index 9a91d33ae3a..cf52e06e6a8 100644 --- a/cpp/src/IceUtil/Exception.cpp +++ b/cpp/src/IceUtil/Exception.cpp @@ -16,6 +16,13 @@ using namespace std; +namespace IceUtil +{ + +bool nullHandleAbort = false; + +}; + IceUtil::Exception::Exception() : _file(0), _line(0) @@ -82,6 +89,10 @@ IceUtil::operator<<(ostream& out, const IceUtil::Exception& ex) IceUtil::NullHandleException::NullHandleException(const char* file, int line) : Exception(file, line) { + if(nullHandleAbort) + { + assert(false); + } } string |