From: eap Date: Wed, 18 Apr 2007 12:56:44 +0000 (+0000) Subject: PAL13330 (When mesh generation does not success, trace where) X-Git-Tag: T_EDF_15278 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=defb336a7b658329ec245e5c3e47833802cb1d5e;p=plugins%2Fnetgenplugin.git PAL13330 (When mesh generation does not success, trace where) Catch SIGSEGV in Netgen --- diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index 560aef1..7a0eb7e 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -44,6 +44,9 @@ using namespace std; #include #include +#include +#include + #include "utilities.h" #include @@ -314,10 +317,16 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, Ng_Result status; try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif status = Ng_GenerateVolumeMesh(Netgen_mesh, &Netgen_param); } + catch (Standard_Failure& exc) { + error(COMPERR_OCC_EXCEPTION, exc.GetMessageString()); + status = NG_VOLUME_FAILURE; + } catch (...) { - MESSAGE("An exception has been caught during the Volume Mesh Generation ..."); error(dfltErr(), "Exception in Ng_GenerateVolumeMesh()"); status = NG_VOLUME_FAILURE; }