]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0023505: Sigsegv with fuse on cylinder and cone vsr/23505 V8_4_0 V8_4_0rc3 V8_4_0rc4
authorvsr <vsr@opencascade.com>
Thu, 16 Nov 2017 12:17:10 +0000 (15:17 +0300)
committervsr <vsr@opencascade.com>
Thu, 16 Nov 2017 12:17:10 +0000 (15:17 +0300)
- Switch to C++ exception handling mechanism

src/StdMeshers/StdMeshers_Distribution.cxx
src/StdMeshers/StdMeshers_NumberOfSegments.cxx
src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx

index 7fb3956adfb85a8df5b99f57ecc881c46b548ac2..aeef4e1ef465976cbb1f543d415ea3311f66b796 100644 (file)
@@ -56,7 +56,6 @@ bool Function::value( const double, double& f ) const
       OCC_CATCH_SIGNALS;
       f = pow( 10., f );
     } catch(Standard_Failure) {
-      Handle(Standard_Failure) aFail = Standard_Failure::Caught();
       f = 0.0;
       ok = false;
     }
@@ -187,7 +186,6 @@ FunctionExpr::FunctionExpr( const char* str, const int conv )
     myExpr = ExprIntrp_GenExp::Create();
     myExpr->Process( ( Standard_CString )str );
   } catch(Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     ok = false;
   }
 
@@ -220,7 +218,6 @@ bool FunctionExpr::value( const double t, double& f ) const
     OCC_CATCH_SIGNALS;
     f = myExpr->Expression()->Evaluate( myVars, myValues );
   } catch(Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     f = 0.0;
     ok = false;
   }
index 927e96d02ab10ac89622854ab2d5ea09a4c4d350..98dac7e8439a66d993600907f5661b1005430dd6 100644 (file)
@@ -235,7 +235,6 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const vector<double>& table)
         val = pow( 10.0, val );
       }
       catch(Standard_Failure) {
-        Handle(Standard_Failure) aFail = Standard_Failure::Caught();
         throw SALOME_Exception( LOCALIZED( "invalid value"));
         return;
       }
@@ -330,7 +329,6 @@ bool process( const TCollection_AsciiString& str, int convMode,
     myExpr = ExprIntrp_GenExp::Create();
     myExpr->Process( str.ToCString() );
   } catch(Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     parsed_ok = false;
   }
 
index 7761be258c16c08da6da945eba496e94a457f454..f9ad75818d814768a43d5f10bc1aaee0134180e9 100644 (file)
@@ -352,7 +352,6 @@ void StdMeshersGUI_DistrPreview::update()
     OCC_CATCH_SIGNALS;
     replot();
   } catch(Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
   }
 }
 
@@ -399,7 +398,6 @@ bool StdMeshersGUI_DistrPreview::init( const QString& str )
     myExpr = ExprIntrp_GenExp::Create();
     myExpr->Process( ( Standard_CString ) str.toLatin1().data() );
   } catch(Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     parsed_ok = false;
   }
 
@@ -438,7 +436,6 @@ double StdMeshersGUI_DistrPreview::calc( bool& ok )
     OCC_CATCH_SIGNALS;
     res = myExpr->Expression()->Evaluate( myVars, myValues );
   } catch(Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     ok = false;
     res = 0.0;
   }
@@ -466,7 +463,6 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const
         if(v < -7) v = -7.0;
         v = pow( 10.0, v );
       } catch(Standard_Failure) {
-        Handle(Standard_Failure) aFail = Standard_Failure::Caught();
         v = 0.0;
         ok = false;
       }