PAL13330 (When mesh generation does not success, trace where)

Catch SIGSEGV in Netgen
This commit is contained in:
eap 2007-04-18 12:56:44 +00:00
parent 861e381989
commit defb336a7b

View File

@ -44,6 +44,9 @@ using namespace std;
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx>
#include "utilities.h"
#include <list>
@ -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;
}