summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/RouterInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/RouterInfo.cpp')
-rw-r--r--cpp/src/Ice/RouterInfo.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/Ice/RouterInfo.cpp b/cpp/src/Ice/RouterInfo.cpp
index 70cad21fbd6..267242e7273 100644
--- a/cpp/src/Ice/RouterInfo.cpp
+++ b/cpp/src/Ice/RouterInfo.cpp
@@ -117,7 +117,10 @@ IceInternal::RouterInfo::getClientProxy()
if (!_clientProxy) // Lazy initialization.
{
_clientProxy = _router->getClientProxy();
- assert(_clientProxy);
+ if (!_clientProxy)
+ {
+ throw NoEndpointException(__FILE__, __LINE__);
+ }
_clientProxy = _clientProxy->ice_router(0); // The client proxy cannot be routed.
}
@@ -139,7 +142,10 @@ IceInternal::RouterInfo::getServerProxy()
if (!_serverProxy) // Lazy initialization.
{
_serverProxy = _router->getServerProxy();
- assert(_serverProxy);
+ if (!_serverProxy)
+ {
+ throw NoEndpointException(__FILE__, __LINE__);
+ }
_serverProxy = _serverProxy->ice_router(0); // The server proxy cannot be routed.
}