From 9e9e56ba2677f1b35f0ab2877b9ef95b29dcf34d Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 10 May 2007 09:07:43 +0000 Subject: [PATCH] NPAL14921 ( memory limitation and Salome freeze ) + catch ( Standard_OutOfMemory& exc ) { --- src/SMESH/SMESH_subMesh.cxx | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) 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; -- 2.39.2