summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-07-25 17:47:36 +0200
committerBenoit Foucher <benoit@zeroc.com>2014-07-25 17:47:36 +0200
commite548dd63ec00b52e8d0f280b7a823516b8f61470 (patch)
treed3960c6fb761b135a4a6ad6cb991c1fa6f4d67f5 /cpp/src
parentImproved IceGrid discovery, it now works with icegrid registry slaves and nodes (diff)
downloadice-e548dd63ec00b52e8d0f280b7a823516b8f61470.tar.bz2
ice-e548dd63ec00b52e8d0f280b7a823516b8f61470.tar.xz
ice-e548dd63ec00b52e8d0f280b7a823516b8f61470.zip
Fixed ICE-5595: Catch C++ exceptions by const reference
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/BasicStream.cpp2
-rw-r--r--cpp/src/Ice/ThreadPool.cpp6
-rw-r--r--cpp/src/IceGrid/AdminSessionI.cpp2
-rw-r--r--cpp/src/IceGrid/Database.cpp14
-rw-r--r--cpp/src/IceGrid/LocatorI.cpp2
-rw-r--r--cpp/src/IceGrid/ServerCache.cpp16
6 files changed, 21 insertions, 21 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp
index ddaa4f29656..157d5e0c8ae 100644
--- a/cpp/src/Ice/BasicStream.cpp
+++ b/cpp/src/Ice/BasicStream.cpp
@@ -1650,7 +1650,7 @@ IceInternal::BasicStream::writeEnum(Int v, Int maxValue)
}
void
-IceInternal::BasicStream::writeException(const Ice::UserException& e)
+IceInternal::BasicStream::writeException(const UserException& e)
{
initWriteEncaps();
_currentWriteEncaps->encoder->write(e);
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 593191c3034..cecbd78d868 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -699,7 +699,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
{
current._handler->message(current);
}
- catch(ThreadPoolDestroyedException&)
+ catch(const ThreadPoolDestroyedException&)
{
return;
}
@@ -721,7 +721,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
{
_selector.select(handlers, _serverIdleTime);
}
- catch(SelectorTimeoutException&)
+ catch(const SelectorTimeoutException&)
{
Lock sync(*this);
if(!_destroyed && _inUse == 0)
@@ -954,7 +954,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
assert(current._handler);
current._handler->message(current);
}
- catch(ThreadPoolDestroyedException&)
+ catch(const ThreadPoolDestroyedException&)
{
return;
}
diff --git a/cpp/src/IceGrid/AdminSessionI.cpp b/cpp/src/IceGrid/AdminSessionI.cpp
index 3be228f8ae5..1e88307b8b6 100644
--- a/cpp/src/IceGrid/AdminSessionI.cpp
+++ b/cpp/src/IceGrid/AdminSessionI.cpp
@@ -470,7 +470,7 @@ AdminSessionI::destroyImpl(bool shutdown)
{
_database->unlock(this);
}
- catch(AccessDeniedException&)
+ catch(const AccessDeniedException&)
{
}
diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp
index 0cbad1e89cb..b409f4b0cd3 100644
--- a/cpp/src/IceGrid/Database.cpp
+++ b/cpp/src/IceGrid/Database.cpp
@@ -1246,7 +1246,7 @@ Database::getAdapterInfo(const string& id)
Lock sync(*this); // Make sure this isn't call during an update.
return _adapterCache.get(id)->getAdapterInfo();
}
- catch(AdapterNotExistException&)
+ catch(const AdapterNotExistException&)
{
}
@@ -1302,7 +1302,7 @@ Database::getFilteredAdapterInfo(const string& id, const Ice::ConnectionPtr& con
}
return infos;
}
- catch(AdapterNotExistException&)
+ catch(const AdapterNotExistException&)
{
}
@@ -1346,7 +1346,7 @@ Database::getAdapterServer(const string& id) const
return adapter->getServerId();
}
}
- catch(AdapterNotExistException&)
+ catch(const AdapterNotExistException&)
{
}
return "";
@@ -1360,7 +1360,7 @@ Database::getAdapterApplication(const string& id) const
Lock sync(*this); // Make sure this isn't call during an update.
return _adapterCache.get(id)->getApplication();
}
- catch(AdapterNotExistException&)
+ catch(const AdapterNotExistException&)
{
}
return "";
@@ -1378,7 +1378,7 @@ Database::getAdapterNode(const string& id) const
return adapter->getNodeName();
}
}
- catch(AdapterNotExistException&)
+ catch(const AdapterNotExistException&)
{
}
return "";
@@ -1715,7 +1715,7 @@ Database::getObjectProxy(const Ice::Identity& id)
//
return _objectCache.get(id)->getProxy();
}
- catch(ObjectNotRegisteredException&)
+ catch(const ObjectNotRegisteredException&)
{
}
@@ -1810,7 +1810,7 @@ Database::getObjectInfo(const Ice::Identity& id)
ObjectEntryPtr object = _objectCache.get(id);
return object->getObjectInfo();
}
- catch(ObjectNotRegisteredException&)
+ catch(const ObjectNotRegisteredException&)
{
}
diff --git a/cpp/src/IceGrid/LocatorI.cpp b/cpp/src/IceGrid/LocatorI.cpp
index e7d34802386..0a0add3df0d 100644
--- a/cpp/src/IceGrid/LocatorI.cpp
+++ b/cpp/src/IceGrid/LocatorI.cpp
@@ -113,7 +113,7 @@ public:
{
ex.ice_throw();
}
- catch(Ice::AdapterNotFoundException&)
+ catch(const Ice::AdapterNotFoundException&)
{
//
// We couldn't find the adapter, we ignore and return the
diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp
index 4db64ce189c..00a392a85cb 100644
--- a/cpp/src/IceGrid/ServerCache.cpp
+++ b/cpp/src/IceGrid/ServerCache.cpp
@@ -266,7 +266,7 @@ ServerEntry::waitForSyncNoThrow(int timeout)
{
waitImpl(timeout);
}
- catch(SynchronizationException&)
+ catch(const SynchronizationException&)
{
assert(timeout >= 0);
}
@@ -604,7 +604,7 @@ ServerEntry::syncImpl()
{
_cache.getNodeCache().get(destroy.node)->destroyServer(this, destroy, timeout);
}
- catch(NodeNotExistException&)
+ catch(const NodeNotExistException&)
{
exception(NodeUnreachableException(destroy.node, "node is not active"));
}
@@ -615,7 +615,7 @@ ServerEntry::syncImpl()
{
_cache.getNodeCache().get(load.node)->loadServer(this, load, session, timeout, noRestart);
}
- catch(NodeNotExistException&)
+ catch(const NodeNotExistException&)
{
exception(NodeUnreachableException(load.node, "node is not active"));
}
@@ -782,7 +782,7 @@ ServerEntry::loadCallback(const ServerPrx& proxy, const AdapterPrxDict& adpts, i
{
_cache.getNodeCache().get(destroy.node)->destroyServer(this, destroy, timeout);
}
- catch(NodeNotExistException&)
+ catch(const NodeNotExistException&)
{
exception(NodeUnreachableException(destroy.node, "node is not active"));
}
@@ -793,7 +793,7 @@ ServerEntry::loadCallback(const ServerPrx& proxy, const AdapterPrxDict& adpts, i
{
_cache.getNodeCache().get(load.node)->loadServer(this, load, session, timeout, noRestart);
}
- catch(NodeNotExistException&)
+ catch(const NodeNotExistException&)
{
exception(NodeUnreachableException(load.node, "node is not active"));
}
@@ -836,7 +836,7 @@ ServerEntry::destroyCallback()
{
_cache.getNodeCache().get(load.node)->loadServer(this, load, session, -1, noRestart);
}
- catch(NodeNotExistException&)
+ catch(const NodeNotExistException&)
{
exception(NodeUnreachableException(load.node, "node is not active"));
}
@@ -888,7 +888,7 @@ ServerEntry::exception(const Ice::Exception& ex)
{
_cache.getNodeCache().get(load.node)->loadServer(this, load, session, timeout, noRestart);
}
- catch(NodeNotExistException&)
+ catch(const NodeNotExistException&)
{
exception(NodeUnreachableException(load.node, "node is not active"));
}
@@ -942,7 +942,7 @@ ServerEntry::checkUpdate(const ServerInfo& info, bool noRestart)
{
node = _cache.getNodeCache().get(info.node);
}
- catch(NodeNotExistException&)
+ catch(const NodeNotExistException&)
{
throw NodeUnreachableException(info.node, "node is not active");
}