Salome HOME
catch exceptions in "rate = algo->GetProgress();"
authoreap <eap@opencascade.com>
Thu, 10 Oct 2013 10:26:03 +0000 (10:26 +0000)
committereap <eap@opencascade.com>
Thu, 10 Oct 2013 10:26:03 +0000 (10:26 +0000)
src/SMESH/SMESH_Mesh.cxx

index c45fefd88bb9a258456831bb3a211377fab928d6..691b86b76dd8bbf17895aa8bb04645a815f9e335 100644 (file)
@@ -1486,7 +1486,17 @@ double SMESH_Mesh::GetComputeProgress() const
           algoDoneCost += smToCompute[i]->GetComputeCost();
         currentSubIds.Add( smToCompute[i]->GetId() );
       }
-      double rate = algo->GetProgress();
+      double rate = 0;
+      try
+      {
+        OCC_CATCH_SIGNALS;
+        rate = algo->GetProgress();
+      }
+      catch (...) {
+#ifdef _DEBUG_
+        cerr << "Exception in " << algo->GetName() << "::GetProgress()" << endl;
+#endif
+      }
       if ( 0. < rate && rate < 1.001 )
       {
         computedCost += rate * ( algoDoneCost + algoNotDoneCost );