From: vsr Date: Thu, 16 Nov 2017 12:17:10 +0000 (+0300) Subject: 0023505: Sigsegv with fuse on cylinder and cone X-Git-Tag: V8_4_0rc3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=badd7ea977f49e005717d1397e462e31098e6a18;p=modules%2Fsmesh.git 0023505: Sigsegv with fuse on cylinder and cone - Switch to C++ exception handling mechanism --- diff --git a/src/StdMeshers/StdMeshers_Distribution.cxx b/src/StdMeshers/StdMeshers_Distribution.cxx index 7fb3956ad..aeef4e1ef 100644 --- a/src/StdMeshers/StdMeshers_Distribution.cxx +++ b/src/StdMeshers/StdMeshers_Distribution.cxx @@ -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; } diff --git a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx index 927e96d02..98dac7e84 100644 --- a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx +++ b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx @@ -235,7 +235,6 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const vector& 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; } diff --git a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx index 7761be258..f9ad75818 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx @@ -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; }