diff options
Diffstat (limited to 'cpp/src/IceGrid/AdminI.cpp')
-rw-r--r-- | cpp/src/IceGrid/AdminI.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp index 1294bf18bb2..e1a380b73c3 100644 --- a/cpp/src/IceGrid/AdminI.cpp +++ b/cpp/src/IceGrid/AdminI.cpp @@ -655,8 +655,9 @@ AdminI::updateObject(const Ice::ObjectPrx& proxy, const ::Ice::Current& current) const Ice::Identity id = proxy->ice_getIdentity(); if(id.category == _database->getInstanceName()) { - throw DeploymentException("updating object `" + current.adapter->getCommunicator()->identityToString(id) + - "' is not allowed"); + DeploymentException ex; + ex.reason ="updating object `" + _database->getCommunicator()->identityToString(id) + "' is not allowed"; + throw ex; } _database->updateObject(proxy); } @@ -668,8 +669,9 @@ AdminI::addObjectWithType(const Ice::ObjectPrx& proxy, const string& type, const const Ice::Identity id = proxy->ice_getIdentity(); if(id.category == _database->getInstanceName()) { - throw DeploymentException("adding object `" + current.adapter->getCommunicator()->identityToString(id) + - "' is not allowed"); + DeploymentException ex; + ex.reason = "adding object `" + _database->getCommunicator()->identityToString(id) + "' is not allowed"; + throw ex; } ObjectInfo info; @@ -684,8 +686,9 @@ AdminI::removeObject(const Ice::Identity& id, const Ice::Current& current) checkIsMaster(); if(id.category == _database->getInstanceName()) { - throw DeploymentException("removing object `" + current.adapter->getCommunicator()->identityToString(id) + - "' is not allowed"); + DeploymentException ex; + ex.reason = "removing object `" + _database->getCommunicator()->identityToString(id) + "' is not allowed"; + throw ex; } _database->removeObject(id); } |