Connected to the following bugs.
Bug IPAL11670
CRASH after trying to import "polygones.med" and "recall_bord.med".
Bug PAL11170
SIGSEGV when "extrusion along a path" gives no result
// $Header$
#include "StdMeshers_Distribution.hxx"
-#include <CASCatch_CatchSignals.hxx>
-#include <CASCatch_Failure.hxx>
-#include <CASCatch_ErrorHandler.hxx>
-#include <OSD.hxx>
+#include "CASCatch_CatchSignals.hxx"
+
#include <math_GaussSingleIntegration.hxx>
#include <utilities.h>
bool Function::value( const double, double& f ) const
{
CASCatch_CatchSignals aCatchSignals;
- aCatchSignals.Activate();
bool ok = true;
if( myConv==0 )
{
f = pow( 10, f );
}
- CASCatch_CATCH(CASCatch_Failure)
+ CASCatch_CATCH(Standard_Failure)
{
- aCatchSignals.Deactivate();
- Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
f = 0.0;
ok = false;
}
myValues( 1, 1 )
{
CASCatch_CatchSignals aCatchSignals;
- aCatchSignals.Activate();
bool ok = true;
CASCatch_TRY
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( ( Standard_CString )str );
}
- CASCatch_CATCH(CASCatch_Failure)
+ CASCatch_CATCH(Standard_Failure)
{
- aCatchSignals.Deactivate();
- Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
ok = false;
}
- aCatchSignals.Deactivate();
if( !ok || !myExpr->IsDone() )
myExpr.Nullify();
if( myExpr.IsNull() )
return false;
- OSD::SetSignal( true );
CASCatch_CatchSignals aCatchSignals;
- aCatchSignals.Activate();
( ( TColStd_Array1OfReal& )myValues ).ChangeValue( 1 ) = t;
bool ok = true;
CASCatch_TRY {
f = myExpr->Expression()->Evaluate( myVars, myValues );
}
- CASCatch_CATCH(CASCatch_Failure) {
- aCatchSignals.Deactivate();
- Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();
+ CASCatch_CATCH(Standard_Failure) {
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
f = 0.0;
ok = false;
}
- aCatchSignals.Deactivate();
ok = Function::value( t, f ) && ok;
return ok;
}
if( _int.IsDone() )
res = _int.Value();
}
- CASCatch_CATCH(CASCatch_Failure)
+ CASCatch_CATCH(Standard_Failure)
{
res = 0.0;
MESSAGE( "Exception in integral calculating" );
#include "SMESHDS_SubMesh.hxx"
#include "SMESH_Mesh.hxx"
-#include <CASCatch_CatchSignals.hxx>
-#include <CASCatch_ErrorHandler.hxx>
-#include <CASCatch_Failure.hxx>
+#include "CASCatch_CatchSignals.hxx"
+
#include <ExprIntrp_GenExp.hxx>
#include <Expr_Array1OfNamedUnknown.hxx>
#include <Expr_NamedUnknown.hxx>
-#include <OSD.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TCollection_AsciiString.hxx>
#include <TopExp.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-#include <Standard_ErrorHandler.hxx>
-
using namespace std;
const double PRECISION = 1e-7;
double prev = -PRECISION;
bool isSame = table.size() == _table.size();
- OSD::SetSignal( true );
CASCatch_CatchSignals aCatchSignals;
- aCatchSignals.Activate();
-
bool pos = false;
for (i=0; i < table.size()/2; i++) {
double par = table[i*2];
{
val = pow( 10.0, val );
}
- CASCatch_CATCH(CASCatch_Failure)
+ CASCatch_CATCH(Standard_Failure)
{
- aCatchSignals.Deactivate();
- Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
throw SALOME_Exception( LOCALIZED( "invalid value"));
return;
}
}
prev = par;
}
- aCatchSignals.Deactivate();
if( !pos )
throw SALOME_Exception(LOCALIZED("value of table function is not positive"));
bool& non_neg, bool& non_zero,
bool& singulars, double& sing_point )
{
- OSD::SetSignal( true );
CASCatch_CatchSignals aCatchSignals;
- aCatchSignals.Activate();
bool parsed_ok = true;
Handle( ExprIntrp_GenExp ) myExpr;
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( str.ToCString() );
}
- CASCatch_CATCH(CASCatch_Failure)
+ CASCatch_CATCH(Standard_Failure)
{
- aCatchSignals.Deactivate();
- Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
parsed_ok = false;
}
- aCatchSignals.Deactivate();
syntax = false;
args = false;
#include "StdMeshersGUI_DistrPreview.h"
+#include "CASCatch_CatchSignals.hxx"
+
#include <Expr_NamedUnknown.hxx>
#include <Expr_GeneralExpression.hxx>
-#include <CASCatch_CatchSignals.hxx>
-#include <CASCatch_Failure.hxx>
-#include <CASCatch_ErrorHandler.hxx>
-#include <OSD.hxx>
StdMeshersGUI_DistrPreview::StdMeshersGUI_DistrPreview( QWidget* p, StdMeshers::StdMeshers_NumberOfSegments_ptr h )
: QwtPlot( p ),
delete[] y;
x = y = 0;
- OSD::SetSignal( true );
CASCatch_CatchSignals aCatchSignals;
- aCatchSignals.Activate();
CASCatch_TRY
{
replot();
}
- CASCatch_CATCH(CASCatch_Failure)
+ CASCatch_CATCH(Standard_Failure)
{
- aCatchSignals.Deactivate();
- Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
}
- aCatchSignals.Deactivate();
}
void StdMeshersGUI_DistrPreview::showError()
bool StdMeshersGUI_DistrPreview::init( const QString& str )
{
CASCatch_CatchSignals aCatchSignals;
- aCatchSignals.Activate();
bool parsed_ok = true;
CASCatch_TRY
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( ( Standard_CString ) str.latin1() );
}
- CASCatch_CATCH(CASCatch_Failure)
+ CASCatch_CATCH(Standard_Failure)
{
- aCatchSignals.Deactivate();
- Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
parsed_ok = false;
}
- aCatchSignals.Deactivate();
bool syntax = false, args = false;
if( parsed_ok && myExpr->IsDone() )
double StdMeshersGUI_DistrPreview::calc( bool& ok )
{
- OSD::SetSignal( true );
double res = 0.0;
CASCatch_CatchSignals aCatchSignals;
- aCatchSignals.Activate();
ok = true;
CASCatch_TRY {
res = myExpr->Expression()->Evaluate( myVars, myValues );
}
- CASCatch_CATCH(CASCatch_Failure) {
- aCatchSignals.Deactivate();
- Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();
+ CASCatch_CATCH(Standard_Failure) {
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
ok = false;
res = 0.0;
}
- aCatchSignals.Deactivate();
+
return res;
}
bool StdMeshersGUI_DistrPreview::convert( double& v ) const
{
CASCatch_CatchSignals aCatchSignals;
- aCatchSignals.Activate();
bool ok = true;
switch( myConv )
{
v = pow( 10.0, v );
}
- CASCatch_CATCH(CASCatch_Failure)
+ CASCatch_CATCH(Standard_Failure)
{
- aCatchSignals.Deactivate();
- Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
v = 0.0;
ok = false;
}
v = 0;
break;
}
- aCatchSignals.Deactivate();
+
return ok;
}