diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-10-01 03:15:11 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-10-01 03:15:11 +0000 |
commit | bfb305ce183f070aa793657cb72a5ae5460044ae (patch) | |
tree | bdcd2b9e31da0b036a135e114e1c9724a37a1290 /cpp/src | |
parent | fix (diff) | |
download | ice-bfb305ce183f070aa793657cb72a5ae5460044ae.tar.bz2 ice-bfb305ce183f070aa793657cb72a5ae5460044ae.tar.xz ice-bfb305ce183f070aa793657cb72a5ae5460044ae.zip |
Improved few local exceptions and evictor fix.
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Freeze/EvictorI.cpp | 10 | ||||
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 8 | ||||
-rw-r--r-- | cpp/src/Ice/EndpointFactoryManager.cpp | 8 | ||||
-rw-r--r-- | cpp/src/Ice/Exception.cpp | 12 | ||||
-rw-r--r-- | cpp/src/Ice/ObjectAdapterI.cpp | 60 | ||||
-rw-r--r-- | cpp/src/Ice/Proxy.cpp | 8 | ||||
-rw-r--r-- | cpp/src/Ice/ReferenceFactory.cpp | 78 | ||||
-rw-r--r-- | cpp/src/Ice/TcpEndpoint.cpp | 20 | ||||
-rw-r--r-- | cpp/src/Ice/UdpEndpoint.cpp | 20 | ||||
-rw-r--r-- | cpp/src/IceSSL/SslEndpoint.cpp | 20 | ||||
-rw-r--r-- | cpp/src/IceXML/StreamI.cpp | 4 |
11 files changed, 178 insertions, 70 deletions
diff --git a/cpp/src/Freeze/EvictorI.cpp b/cpp/src/Freeze/EvictorI.cpp index 553ff4e905d..849d152fafb 100644 --- a/cpp/src/Freeze/EvictorI.cpp +++ b/cpp/src/Freeze/EvictorI.cpp @@ -210,14 +210,10 @@ Freeze::EvictorI::locate(const Current& current, LocalObjectPtr& cookie) assert(_db); // - // TODO: HACK: It's possible that locate is called on a - // deactivated servant locator. There's currently no nice way to - // handle this case so we just through an UnknownLocatoException. + // If this operation is called on a deactivated servant locator, + // it's a bug in Ice. // - if(_deactivated) - { - throw Ice::UnknownLocalException(__FILE__, __LINE__); - } + assert(!_deactivated); EvictorElementPtr element; diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index 48b0ec5f15a..c6359f26960 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -897,7 +897,9 @@ IceInternal::BasicStream::read(const string& signatureType, const ObjectFactoryP if(!v) { - throw NoObjectFactoryException(__FILE__, __LINE__); + NoObjectFactoryException ex(__FILE__, __LINE__); + ex.type = id; + throw ex; } } _currentReadEncaps->objectsRead.push_back(v.get()); @@ -946,5 +948,7 @@ IceInternal::BasicStream::throwException(const string* throwsBegin, const string return p.first - throwsBegin; } - throw NoUserExceptionFactoryException(__FILE__, __LINE__); + NoUserExceptionFactoryException ex(__FILE__, __LINE__); + ex.type = id; + throw ex; } diff --git a/cpp/src/Ice/EndpointFactoryManager.cpp b/cpp/src/Ice/EndpointFactoryManager.cpp index e068c147d8d..6a9adec0007 100644 --- a/cpp/src/Ice/EndpointFactoryManager.cpp +++ b/cpp/src/Ice/EndpointFactoryManager.cpp @@ -74,7 +74,9 @@ IceInternal::EndpointFactoryManager::create(const string& str) const string::size_type beg = str.find_first_not_of(delim); if(beg == string::npos) { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } string::size_type end = str.find_first_of(delim, beg); @@ -101,7 +103,9 @@ IceInternal::EndpointFactoryManager::create(const string& str) const } } - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } EndpointPtr diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp index b2844f75c05..9ecde5040f7 100644 --- a/cpp/src/Ice/Exception.cpp +++ b/cpp/src/Ice/Exception.cpp @@ -84,7 +84,7 @@ void Ice::ObjectAdapterDeactivatedException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nobject adapter deactivated"; + out << ":\nobject adapter `" << name << "' deactivated"; } void @@ -105,21 +105,21 @@ void Ice::NoEndpointException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nno suitable endpoint available"; + out << ":\nno suitable endpoint available for proxy `" << proxy << "'"; } void Ice::EndpointParseException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nerror while parsing endpoint"; + out << ":\nerror while parsing endpoint `" << str << "'"; } void Ice::ProxyParseException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nerror while parsing proxy"; + out << ":\nerror while parsing proxy `" << str << "'"; } void @@ -333,14 +333,14 @@ void Ice::NoObjectFactoryException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nprotocol error: no suitable object factory found"; + out << ":\nprotocol error: no suitable object factory found for `" << type << "'"; } void Ice::NoUserExceptionFactoryException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nprotocol error: no suitable user exception factory found"; + out << ":\nprotocol error: no suitable user exception factory found for `" << type << "'"; } void diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index c5b41c01226..5b0ef68225b 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -43,7 +43,9 @@ Ice::ObjectAdapterI::getCommunicator() if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } return _communicator; @@ -56,7 +58,9 @@ Ice::ObjectAdapterI::activate() if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } if(!_printAdapterReadyDone) @@ -112,7 +116,9 @@ Ice::ObjectAdapterI::hold() if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(), @@ -169,7 +175,9 @@ Ice::ObjectAdapterI::add(const ObjectPtr& object, const Identity& ident) if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } _activeServantMapHint = _activeServantMap.insert(_activeServantMapHint, make_pair(ident, object)); @@ -184,7 +192,9 @@ Ice::ObjectAdapterI::addWithUUID(const ObjectPtr& object) if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } Identity ident; @@ -202,7 +212,9 @@ Ice::ObjectAdapterI::remove(const Identity& ident) if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } _activeServantMap.erase(ident); @@ -216,7 +228,9 @@ Ice::ObjectAdapterI::addServantLocator(const ServantLocatorPtr& locator, const s if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } _locatorMapHint = _locatorMap.insert(_locatorMapHint, make_pair(prefix, locator)); @@ -229,7 +243,9 @@ Ice::ObjectAdapterI::removeServantLocator(const string& prefix) if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } map<string, ServantLocatorPtr>::iterator p = _locatorMap.end(); @@ -270,7 +286,9 @@ Ice::ObjectAdapterI::findServantLocator(const string& prefix) if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } map<string, ServantLocatorPtr>::iterator p = _locatorMap.end(); @@ -338,7 +356,9 @@ Ice::ObjectAdapterI::createProxy(const Identity& ident) if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } return newProxy(ident); @@ -351,7 +371,9 @@ Ice::ObjectAdapterI::createDirectProxy(const Identity& ident) if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } return newDirectProxy(ident); @@ -364,7 +386,9 @@ Ice::ObjectAdapterI::createReverseProxy(const Identity& ident) if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } // @@ -383,7 +407,9 @@ Ice::ObjectAdapterI::addRouter(const RouterPrx& router) if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } RouterInfoPtr routerInfo = _instance->routerManager()->get(router); @@ -426,7 +452,9 @@ Ice::ObjectAdapterI::setLocator(const LocatorPrx& locator) if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } _locatorInfo = _instance->locatorManager()->get(locator); @@ -439,7 +467,9 @@ Ice::ObjectAdapterI::getIncomingConnections() const if(!_instance) { - throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); + ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } list<ConnectionPtr> connections; diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index fd601088540..303f145d452 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -896,7 +896,9 @@ IceDelegateM::Ice::Object::setup(const ReferencePtr& ref) if(endpoints.empty()) { - throw NoEndpointException(__FILE__, __LINE__); + NoEndpointException ex(__FILE__, __LINE__); + ex.proxy = __reference->toString(); + throw ex; } list<ConnectionPtr>::iterator p; @@ -939,7 +941,9 @@ IceDelegateM::Ice::Object::setup(const ReferencePtr& ref) vector<EndpointPtr> filteredEndpoints = filterEndpoints(endpoints); if(filteredEndpoints.empty()) { - throw NoEndpointException(__FILE__, __LINE__); + NoEndpointException ex(__FILE__, __LINE__); + ex.proxy = __reference->toString(); + throw ex; } try diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp index a1f85c6c38f..c46708a4cdc 100644 --- a/cpp/src/Ice/ReferenceFactory.cpp +++ b/cpp/src/Ice/ReferenceFactory.cpp @@ -127,9 +127,11 @@ IceInternal::ReferenceFactory::create(const string& str) beg = s.find_first_not_of(delim, end); if(beg == string::npos) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } - + // // Extract the identity, which may be enclosed in single // or double quotation marks. @@ -138,7 +140,9 @@ IceInternal::ReferenceFactory::create(const string& str) end = checkQuote(s, beg); if(end == string::npos) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } else if(end == 0) { @@ -158,7 +162,9 @@ IceInternal::ReferenceFactory::create(const string& str) if(beg == end) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } Identity ident = stringToIdentity(idstr); @@ -200,7 +206,9 @@ IceInternal::ReferenceFactory::create(const string& str) string option = s.substr(beg, end - beg); if(option.length() != 2 || option[0] != '-') { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } // @@ -218,7 +226,9 @@ IceInternal::ReferenceFactory::create(const string& str) end = checkQuote(s, beg); if(end == string::npos) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } else if(end == 0) { @@ -248,7 +258,9 @@ IceInternal::ReferenceFactory::create(const string& str) { if(argument.empty()) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } const string::size_type argLen = argument.size(); @@ -286,7 +298,9 @@ IceInternal::ReferenceFactory::create(const string& str) string token; if(!decodeString(argument, argBeg, argEnd, token)) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } facet.push_back(token); argBeg = argEnd + 1; @@ -294,7 +308,9 @@ IceInternal::ReferenceFactory::create(const string& str) if(facet.size() == 0) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } break; @@ -304,7 +320,9 @@ IceInternal::ReferenceFactory::create(const string& str) { if(!argument.empty()) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } mode = Reference::ModeTwoway; break; @@ -314,7 +332,9 @@ IceInternal::ReferenceFactory::create(const string& str) { if(!argument.empty()) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } mode = Reference::ModeOneway; break; @@ -324,7 +344,9 @@ IceInternal::ReferenceFactory::create(const string& str) { if(!argument.empty()) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } mode = Reference::ModeBatchOneway; break; @@ -334,7 +356,9 @@ IceInternal::ReferenceFactory::create(const string& str) { if(!argument.empty()) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } mode = Reference::ModeDatagram; break; @@ -344,7 +368,9 @@ IceInternal::ReferenceFactory::create(const string& str) { if(!argument.empty()) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } mode = Reference::ModeBatchDatagram; break; @@ -354,7 +380,9 @@ IceInternal::ReferenceFactory::create(const string& str) { if(!argument.empty()) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } secure = true; break; @@ -364,7 +392,9 @@ IceInternal::ReferenceFactory::create(const string& str) { if(!argument.empty()) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } compress = true; break; @@ -372,7 +402,9 @@ IceInternal::ReferenceFactory::create(const string& str) default: { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } } } @@ -404,13 +436,17 @@ IceInternal::ReferenceFactory::create(const string& str) beg = s.find_first_not_of(delim, beg + 1); if(beg == string::npos) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } end = checkQuote(s, beg); if(end == string::npos) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } else if(end == 0) { @@ -427,7 +463,9 @@ IceInternal::ReferenceFactory::create(const string& str) if(!decodeString(s, beg, end, adapter) || adapter.size() == 0) { - throw ProxyParseException(__FILE__, __LINE__); + ProxyParseException ex(__FILE__, __LINE__); + ex.str = str; + throw ex; } } } diff --git a/cpp/src/Ice/TcpEndpoint.cpp b/cpp/src/Ice/TcpEndpoint.cpp index 71cc62db29e..260d41c24f6 100644 --- a/cpp/src/Ice/TcpEndpoint.cpp +++ b/cpp/src/Ice/TcpEndpoint.cpp @@ -57,7 +57,9 @@ IceInternal::TcpEndpoint::TcpEndpoint(const InstancePtr& instance, const string& string option = str.substr(beg, end - beg); if(option.length() != 2 || option[0] != '-') { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "tcp " + str; + throw ex; } string argument; @@ -79,7 +81,9 @@ IceInternal::TcpEndpoint::TcpEndpoint(const InstancePtr& instance, const string& { if(argument.empty()) { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "tcp " + str; + throw ex; } const_cast<string&>(_host) = argument; break; @@ -90,7 +94,9 @@ IceInternal::TcpEndpoint::TcpEndpoint(const InstancePtr& instance, const string& istringstream p(argument); if(!(p >> const_cast<Int&>(_port)) || !p.eof()) { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "tcp " + str; + throw ex; } break; } @@ -100,14 +106,18 @@ IceInternal::TcpEndpoint::TcpEndpoint(const InstancePtr& instance, const string& istringstream t(argument); if(!(t >> const_cast<Int&>(_timeout)) || !t.eof()) { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "tcp " + str; + throw ex; } break; } default: { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "tcp " + str; + throw ex; } } } diff --git a/cpp/src/Ice/UdpEndpoint.cpp b/cpp/src/Ice/UdpEndpoint.cpp index 4ebb4f1fd7b..a1c10319de1 100644 --- a/cpp/src/Ice/UdpEndpoint.cpp +++ b/cpp/src/Ice/UdpEndpoint.cpp @@ -55,7 +55,9 @@ IceInternal::UdpEndpoint::UdpEndpoint(const InstancePtr& instance, const string& string option = str.substr(beg, end - beg); if(option.length() != 2 || option[0] != '-') { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "udp " + str; + throw ex; } string argument; @@ -77,7 +79,9 @@ IceInternal::UdpEndpoint::UdpEndpoint(const InstancePtr& instance, const string& { if(argument.empty()) { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "udp " + str; + throw ex; } const_cast<string&>(_host) = argument; break; @@ -88,7 +92,9 @@ IceInternal::UdpEndpoint::UdpEndpoint(const InstancePtr& instance, const string& istringstream p(argument); if(!(p >> const_cast<Int&>(_port)) || !p.eof()) { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "udp " + str; + throw ex; } break; } @@ -97,7 +103,9 @@ IceInternal::UdpEndpoint::UdpEndpoint(const InstancePtr& instance, const string& { if(!argument.empty()) { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "udp " + str; + throw ex; } const_cast<bool&>(_connect) = true; break; @@ -105,7 +113,9 @@ IceInternal::UdpEndpoint::UdpEndpoint(const InstancePtr& instance, const string& default: { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "udp " + str; + throw ex; } } } diff --git a/cpp/src/IceSSL/SslEndpoint.cpp b/cpp/src/IceSSL/SslEndpoint.cpp index fbfdaf7245e..84d986fb50a 100644 --- a/cpp/src/IceSSL/SslEndpoint.cpp +++ b/cpp/src/IceSSL/SslEndpoint.cpp @@ -57,7 +57,9 @@ IceSSL::SslEndpoint::SslEndpoint(const OpenSSLPluginIPtr& plugin, const string& string option = str.substr(beg, end - beg); if(option.length() != 2 || option[0] != '-') { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "ssl " + str; + throw ex; } string argument; @@ -79,7 +81,9 @@ IceSSL::SslEndpoint::SslEndpoint(const OpenSSLPluginIPtr& plugin, const string& { if(argument.empty()) { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "ssl " + str; + throw ex; } const_cast<string&>(_host) = argument; break; @@ -89,7 +93,9 @@ IceSSL::SslEndpoint::SslEndpoint(const OpenSSLPluginIPtr& plugin, const string& { if(argument.empty()) { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "ssl " + str; + throw ex; } const_cast<Int&>(_port) = atoi(argument.c_str()); break; @@ -99,7 +105,9 @@ IceSSL::SslEndpoint::SslEndpoint(const OpenSSLPluginIPtr& plugin, const string& { if(argument.empty()) { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "ssl " + str; + throw ex; } const_cast<Int&>(_timeout) = atoi(argument.c_str()); break; @@ -107,7 +115,9 @@ IceSSL::SslEndpoint::SslEndpoint(const OpenSSLPluginIPtr& plugin, const string& default: { - throw EndpointParseException(__FILE__, __LINE__); + EndpointParseException ex(__FILE__, __LINE__); + ex.str = "ssl " + str; + throw ex; } } } diff --git a/cpp/src/IceXML/StreamI.cpp b/cpp/src/IceXML/StreamI.cpp index 916a61aaff6..f7060c18b98 100644 --- a/cpp/src/IceXML/StreamI.cpp +++ b/cpp/src/IceXML/StreamI.cpp @@ -1196,7 +1196,9 @@ IceXML::StreamI::readObject(const string& name, const string& signatureType, con if(!value) { - throw ::Ice::NoObjectFactoryException(__FILE__, __LINE__); + ::Ice::NoObjectFactoryException ex(__FILE__, __LINE__); + ex.type = type; + throw ex; } } |