]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Throw exception instead of exit when ContainerManager cannot be resolved in naming...
authorbarate <barate>
Tue, 18 Dec 2012 15:51:10 +0000 (15:51 +0000)
committerbarate <barate>
Tue, 18 Dec 2012 15:51:10 +0000 (15:51 +0000)
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx

index afd7e6f6315a921882ed94678b39af9c6d247922..6d138af19949ffbc07aea0262d7821255842a3bf 100644 (file)
@@ -100,11 +100,13 @@ SALOME_LifeCycleCORBA::SALOME_LifeCycleCORBA(SALOME_NamingService *ns)
 
   CORBA::Object_var obj =
     _NS->Resolve(SALOME_ContainerManager::_ContainerManagerNameInNS);
-  ASSERT( !CORBA::is_nil(obj));
+  if (CORBA::is_nil(obj))
+    throw SALOME_Exception("Error: Cannot resolve ContainerManager in Naming Service");
   _ContManager=Engines::ContainerManager::_narrow(obj);
 
   obj = _NS->Resolve(SALOME_ResourcesManager::_ResourcesManagerNameInNS);
-  ASSERT( !CORBA::is_nil(obj));
+  if (CORBA::is_nil(obj))
+    throw SALOME_Exception("Error: Cannot resolve ResourceManager in Naming Service");
   _ResManager=Engines::ResourcesManager::_narrow(obj);
 }