X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FGObjectsMVCFactory.cxx;h=41b3fe06aa57e36d987bb3976983363e52234b41;hb=228d83d191151e160937f836bc768365e55e1cf0;hp=0b299b8e9922f2559565e82451d45c7bd841f5f6;hpb=9877bb1bc1cbfc8b4ac0dbd45d443ba670c9d8d2;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/GObjectsMVCFactory.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/GObjectsMVCFactory.cxx index 0b299b8..41b3fe0 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/GObjectsMVCFactory.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/GObjectsMVCFactory.cxx @@ -62,10 +62,20 @@ namespace bbtk //========================================================================= BlackBoxDescriptor::Pointer GObjectsMVCFactory::getBlackBoxDescriptor(std::string packageName, std::string boxName) - { - Factory::Pointer factory = _interpreter->GetExecuter()->GetFactory(); - Package::Pointer k = factory->GetPackage(packageName); - std::map< std::string, BlackBoxDescriptor::Pointer> mapDesc = k->GetDescriptorMap(); + { + Factory::Pointer factory; + Package::Pointer k; + std::map< std::string, BlackBoxDescriptor::Pointer> mapDesc; + try{ + factory = _interpreter->GetExecuter()->GetFactory(); + k = factory->GetPackage(packageName); + mapDesc = k->GetDescriptorMap(); + }catch(Exception e){ + printf("SCP: Exception in BlackBoxDescriptor::Pointer GObjectsMVCFactory::getBlackBoxDescriptor for package %s\n", packageName.c_str()); + printf("SCP: ERROR package %s probably does not exist\n", packageName.c_str()); + } + + return mapDesc[boxName]; }