Salome HOME
DCQ : Merge with Ecole Ete a6.
[modules/visu.git] / src / PIPELINE / VISU_PipeLine.cxx
index e128b7083f4cf28fbfb4dec3f1d4c111d41c36bc..a99eba600854ef89c7862149f1f4326069aadd86 100644 (file)
@@ -92,7 +92,6 @@ void VISU_PipeLine::Update(){
   myMapper->Update();
 }
 
-
 int VISU_PipeLine::CheckAvailableMemory(const float& theSize){
   try{
     if(theSize > ULONG_MAX) return 0;
@@ -103,8 +102,11 @@ int VISU_PipeLine::CheckAvailableMemory(const float& theSize){
       MESSAGE("CheckAvailableMemory("<<theSize<<") - cannot alloacate such amount of memory!!!");
     return aCheck != NULL;
     //return theSize < 1000*1024*1024;
-  }catch(...){
-    if(MYDEBUG)
+  }catch(std::bad_alloc& exc){
+    if(MYDEBUG) 
+      MESSAGE("CheckAvailableMemory("<<theSize<<") " << exc.what());
+  } catch(...) {
+    if(MYDEBUG) 
       MESSAGE("CheckAvailableMemory("<<theSize<<") - unexpected exception was caught!!!");
   }
   return 0;