Salome HOME
Avoid failure of Create Mesh dialog in case of invalid plugin library
authoreap <eap@opencascade.com>
Fri, 24 Dec 2021 14:53:03 +0000 (17:53 +0300)
committereap <eap@opencascade.com>
Fri, 24 Dec 2021 14:53:03 +0000 (17:53 +0300)
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx

index 3e5bd4122356a4165bb8d7ebea733a47d773431b..7fee3a55ba2aab8b3388b9678a833f6b2a2a2bfd 100644 (file)
@@ -34,7 +34,8 @@
 #include "SMESHGUI_VTKUtils.h"
 #include "SMESHGUI_XmlHandler.h"
 
-#include "SMESH_Actor.h"
+#include <SMESH_Actor.h>
+#include <SMESH_TryCatch.hxx>
 
 // SALOME GUI includes
 #include <SUIT_Desktop.h>
@@ -628,10 +629,13 @@ namespace SMESH
 
     HypothesisData* aHypData = GetHypothesisData(aHypType);
     QString aServLib = aHypData->ServerLibName;
+    SMESH_TRY;
     return SMESHGUI::GetSMESHGen()->IsApplicable( aHypType.toLatin1().data(),
                                                   aServLib.toUtf8().data(),
                                                   theGeomObject,
                                                   toCheckAll);
+    SMESH_CATCH( SMESH::printErrorInDebugMode );
+    return false;
   }