From: eap Date: Thu, 10 May 2007 09:07:43 +0000 (+0000) Subject: NPAL14921 ( memory limitation and Salome freeze ) X-Git-Tag: T_EDF_15278 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9e9e56ba2677f1b35f0ab2877b9ef95b29dcf34d;p=modules%2Fsmesh.git NPAL14921 ( memory limitation and Salome freeze ) + catch ( Standard_OutOfMemory& exc ) { --- diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index ef34015fe..86da9d3a0 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -53,7 +53,7 @@ #include #include -#include +#include #include using namespace std; @@ -1400,6 +1400,20 @@ bool SMESH_subMesh::ComputeStateEngine(int event) if ( !ret ) _computeError = algo->GetComputeError(); } + catch ( std::bad_alloc& exc ) { + if ( _computeError ) { + _computeError->myName = COMPERR_MEMORY_PB; + //_computeError->myComment = exc.what(); + } + throw exc; + } + catch ( Standard_OutOfMemory& exc ) { + if ( _computeError ) { + _computeError->myName = COMPERR_MEMORY_PB; + //_computeError->myComment = exc.what(); + } + throw exc; + } catch (Standard_Failure& exc) { if ( !_computeError ) _computeError = SMESH_ComputeError::New(); _computeError->myName = COMPERR_OCC_EXCEPTION; @@ -1410,13 +1424,6 @@ bool SMESH_subMesh::ComputeStateEngine(int event) _computeError->myName = COMPERR_SLM_EXCEPTION; _computeError->myComment = S_ex.what(); } - catch ( std::bad_alloc& exc ) { - if ( _computeError ) { - _computeError->myName = COMPERR_MEMORY_PB; - _computeError->myComment = exc.what(); - } - throw exc; - } catch ( std::exception& exc ) { if ( !_computeError ) _computeError = SMESH_ComputeError::New(); _computeError->myName = COMPERR_STD_EXCEPTION;