mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 01:40:33 +05:00
0023505: Sigsegv with fuse on cylinder and cone
- Switch to C++ exception handling mechanism
This commit is contained in:
parent
62a5ed1578
commit
70c33e5f83
@ -56,7 +56,6 @@ bool Function::value( const double, double& f ) const
|
|||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
f = pow( 10., f );
|
f = pow( 10., f );
|
||||||
} catch(Standard_Failure) {
|
} catch(Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
|
||||||
f = 0.0;
|
f = 0.0;
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
@ -187,7 +186,6 @@ FunctionExpr::FunctionExpr( const char* str, const int conv )
|
|||||||
myExpr = ExprIntrp_GenExp::Create();
|
myExpr = ExprIntrp_GenExp::Create();
|
||||||
myExpr->Process( ( Standard_CString )str );
|
myExpr->Process( ( Standard_CString )str );
|
||||||
} catch(Standard_Failure) {
|
} catch(Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +218,6 @@ bool FunctionExpr::value( const double t, double& f ) const
|
|||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
f = myExpr->Expression()->Evaluate( myVars, myValues );
|
f = myExpr->Expression()->Evaluate( myVars, myValues );
|
||||||
} catch(Standard_Failure) {
|
} catch(Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
|
||||||
f = 0.0;
|
f = 0.0;
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,6 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const vector<double>& table)
|
|||||||
val = pow( 10.0, val );
|
val = pow( 10.0, val );
|
||||||
}
|
}
|
||||||
catch(Standard_Failure) {
|
catch(Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
|
||||||
throw SALOME_Exception( LOCALIZED( "invalid value"));
|
throw SALOME_Exception( LOCALIZED( "invalid value"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -330,7 +329,6 @@ bool process( const TCollection_AsciiString& str, int convMode,
|
|||||||
myExpr = ExprIntrp_GenExp::Create();
|
myExpr = ExprIntrp_GenExp::Create();
|
||||||
myExpr->Process( str.ToCString() );
|
myExpr->Process( str.ToCString() );
|
||||||
} catch(Standard_Failure) {
|
} catch(Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
|
||||||
parsed_ok = false;
|
parsed_ok = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +352,6 @@ void StdMeshersGUI_DistrPreview::update()
|
|||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
replot();
|
replot();
|
||||||
} catch(Standard_Failure) {
|
} 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 = ExprIntrp_GenExp::Create();
|
||||||
myExpr->Process( ( Standard_CString ) str.toLatin1().data() );
|
myExpr->Process( ( Standard_CString ) str.toLatin1().data() );
|
||||||
} catch(Standard_Failure) {
|
} catch(Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
|
||||||
parsed_ok = false;
|
parsed_ok = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -438,7 +436,6 @@ double StdMeshersGUI_DistrPreview::calc( bool& ok )
|
|||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
res = myExpr->Expression()->Evaluate( myVars, myValues );
|
res = myExpr->Expression()->Evaluate( myVars, myValues );
|
||||||
} catch(Standard_Failure) {
|
} catch(Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
|
||||||
ok = false;
|
ok = false;
|
||||||
res = 0.0;
|
res = 0.0;
|
||||||
}
|
}
|
||||||
@ -466,7 +463,6 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const
|
|||||||
if(v < -7) v = -7.0;
|
if(v < -7) v = -7.0;
|
||||||
v = pow( 10.0, v );
|
v = pow( 10.0, v );
|
||||||
} catch(Standard_Failure) {
|
} catch(Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
|
||||||
v = 0.0;
|
v = 0.0;
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user