]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
NPAL14921 ( memory limitation and Salome freeze ) T_EDF_15278
authoreap <eap@opencascade.com>
Thu, 10 May 2007 09:07:43 +0000 (09:07 +0000)
committereap <eap@opencascade.com>
Thu, 10 May 2007 09:07:43 +0000 (09:07 +0000)
+        catch ( Standard_OutOfMemory& exc ) {

src/SMESH/SMESH_subMesh.cxx

index ef34015fe1b2805d8b0c6711ad7b3a527380596c..86da9d3a0dfbf5c6a8be79f26242592b881a2587 100644 (file)
@@ -53,7 +53,7 @@
 #include <TopoDS_Compound.hxx>
 #include <gp_Pnt.hxx>
 
-#include <Standard_Failure.hxx>
+#include <Standard_OutOfMemory.hxx>
 #include <Standard_ErrorHandler.hxx>
 
 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;