From 83ee5cc81d8ad2e91de61222908da390ab4f93b8 Mon Sep 17 00:00:00 2001 From: ribes Date: Mon, 30 Mar 2009 13:30:46 +0000 Subject: [PATCH] _narrow cand send an exception ! --- src/Container/SALOME_ContainerManager.cxx | 51 ++++++++++++----------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index fdf1465b1..1273018a2 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -145,32 +145,33 @@ void SALOME_ContainerManager::ShutdownContainers() for(list::iterator iter=lstCont.begin();iter!=lstCont.end();iter++){ SCRUTE((*iter)); } - for(list::iterator iter=lstCont.begin();iter!=lstCont.end();iter++){ - SCRUTE((*iter)); - CORBA::Object_var obj=_NS->Resolve((*iter).c_str()); - Engines::Container_var cont=Engines::Container::_narrow(obj); - if(!CORBA::is_nil(cont)) - { + for(list::iterator iter=lstCont.begin();iter!=lstCont.end();iter++) + { + try + { + SCRUTE((*iter)); + CORBA::Object_var obj=_NS->Resolve((*iter).c_str()); + Engines::Container_var cont=Engines::Container::_narrow(obj); + if(!CORBA::is_nil(cont)) + { MESSAGE("ShutdownContainers: " << (*iter)); - try - { - cont->Shutdown(); - } - catch(CORBA::SystemException& e) - { - INFOS("CORBA::SystemException ignored : " << e); - } - catch(CORBA::Exception&) - { - INFOS("CORBA::Exception ignored."); - } - catch(...) - { - INFOS("Unknown exception ignored."); - } - } - else - MESSAGE("ShutdownContainers: no container ref for " << (*iter)); + cont->Shutdown(); + } + else + MESSAGE("ShutdownContainers: no container ref for " << (*iter)); + } + catch(CORBA::SystemException& e) + { + INFOS("CORBA::SystemException ignored : " << e); + } + catch(CORBA::Exception&) + { + INFOS("CORBA::Exception ignored."); + } + catch(...) + { + INFOS("Unknown exception ignored."); + } } } } -- 2.39.2