diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-11-05 11:17:12 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-11-05 11:17:12 -0330 |
commit | 0d9d243d8a467b0fd09d15444962bf00add4fe75 (patch) | |
tree | 5ab83c811b5fc81d5275b9bb75043f92fc19e5bc /cpp/src | |
parent | adding IceBT transport for Android (diff) | |
download | ice-0d9d243d8a467b0fd09d15444962bf00add4fe75.tar.bz2 ice-0d9d243d8a467b0fd09d15444962bf00add4fe75.tar.xz ice-0d9d243d8a467b0fd09d15444962bf00add4fe75.zip |
IceGrid: catch LMDB exceptions on Database creation
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceGrid/RegistryI.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index 1450436306a..a7649c37c5a 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -389,7 +389,17 @@ RegistryI::startImpl() ""); const IceStorm::TopicManagerPrx topicManager = _iceStorm->getTopicManager(); - _database = new Database(_registryAdapter, topicManager, _instanceName, _traceLevels, getInfo(), _readonly); + try + { + _database = new Database(_registryAdapter, topicManager, _instanceName, _traceLevels, getInfo(), _readonly); + } + catch(const IceDB::LMDBException& ex) + { + Error out(_communicator->getLogger()); + out << "couldn't open database:\n"; + out << ex; + return false; + } _wellKnownObjects = new WellKnownObjectsManager(_database); if(!_initFromReplica.empty()) @@ -449,11 +459,11 @@ RegistryI::startImpl() { Ice::Long serial; IceGrid::InternalRegistryPrx registry = IceGrid::InternalRegistryPrx::checkedCast(proxy); - ApplicationInfoSeq applications = registry->getApplications(serial); + ApplicationInfoSeq applications = registry->getApplications(serial); _database->syncApplications(applications, serial); - AdapterInfoSeq adapters = registry->getAdapters(serial); + AdapterInfoSeq adapters = registry->getAdapters(serial); _database->syncAdapters(adapters, serial); - ObjectInfoSeq objects = registry->getObjects(serial); + ObjectInfoSeq objects = registry->getObjects(serial); _database->syncObjects(objects, serial); } catch(const Ice::OperationNotExistException&) |