0023505: Sigsegv with fuse on cylinder and cone

- Switch to C++ exception handling mechanism
This commit is contained in:
vsr 2017-11-16 15:17:10 +03:00
parent 62a5ed1578
commit 70c33e5f83
3 changed files with 0 additions and 9 deletions

View 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;
}

View 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;
}

View 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;
}