#include <gp_Ax2.hxx>
#include <gp_Vec.hxx>
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#define NO_CAS_CATCH
+#endif
+
#include <Standard_Failure.hxx>
+
+#ifdef NO_CAS_CATCH
#include <Standard_ErrorHandler.hxx>
+#else
+#include "CASCatch.hxx"
+#endif
#include <sstream>
myLastCreatedElems = new SMESH::long_array();
myLastCreatedNodes = new SMESH::long_array();
+#ifdef NO_CAS_CATCH
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
#endif
SMESHDS_Mesh* aMesh = GetMeshDS();
-
+
map<int,const SMDS_MeshElement*> elements;
ToMap(theIDsOfElements, aMesh, elements);
const SMESH::PointStruct * P = &theStepVector.PS;
gp_Vec stepVec( P->x, P->y, P->z );
-
+
TElemOfElemListMap aHystory;
::SMESH_MeshEditor anEditor( _myMesh );
anEditor.ExtrusionSweep (elements, stepVec, theNbOfSteps, aHystory);
// Update Python script
TPythonDump() << "stepVector = " << theStepVector;
TPythonDump() << this << ".ExtrusionSweep( "
- << theIDsOfElements << ", stepVector, " << theNbOfSteps << " )";
+ << theIDsOfElements << ", stepVector, " << theNbOfSteps << " )";
- }
- catch(Standard_Failure) {
+#ifdef NO_CAS_CATCH
+ } catch(Standard_Failure) {
+#else
+ } CASCatch_CATCH(Standard_Failure) {
+#endif
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
INFOS( "SMESH_MeshEditor_i::ExtrusionSweep fails - "<< aFail->GetMessageString() );
}
#include <math_GaussSingleIntegration.hxx>
#include <utilities.h>
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#define NO_CAS_CATCH
+#endif
+
#include <Standard_Failure.hxx>
+
+#ifdef NO_CAS_CATCH
#include <Standard_ErrorHandler.hxx>
+#else
+#include "CASCatch.hxx"
+#endif
Function::Function( const int conv )
: myConv( conv )
bool Function::value( const double, double& f ) const
{
bool ok = true;
- if( myConv==0 )
- {
+ if (myConv == 0) {
+#ifdef NO_CAS_CATCH
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
#endif
f = pow( 10, f );
- }
- catch(Standard_Failure)
- {
+#ifdef NO_CAS_CATCH
+ } catch(Standard_Failure) {
+#else
+ } CASCatch_CATCH(Standard_Failure) {
+#endif
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
f = 0.0;
ok = false;
myValues( 1, 1 )
{
bool ok = true;
+#ifdef NO_CAS_CATCH
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
#endif
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( ( Standard_CString )str );
- }
- catch(Standard_Failure)
- {
+#ifdef NO_CAS_CATCH
+ } catch(Standard_Failure) {
+#else
+ } CASCatch_CATCH(Standard_Failure) {
+#endif
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
ok = false;
}
( ( TColStd_Array1OfReal& )myValues ).ChangeValue( 1 ) = t;
bool ok = true;
+#ifdef NO_CAS_CATCH
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
#endif
f = myExpr->Expression()->Evaluate( myVars, myValues );
- }
- catch(Standard_Failure) {
+#ifdef NO_CAS_CATCH
+ } catch(Standard_Failure) {
+#else
+ } CASCatch_CATCH(Standard_Failure) {
+#endif
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
f = 0.0;
ok = false;
double FunctionExpr::integral( const double a, const double b ) const
{
double res = 0.0;
+#ifdef NO_CAS_CATCH
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
#endif
math_GaussSingleIntegration _int( ( math_Function& )*this, a, b, 20 );
if( _int.IsDone() )
res = _int.Value();
- }
- catch(Standard_Failure)
- {
+#ifdef NO_CAS_CATCH
+ } catch(Standard_Failure) {
+#else
+ } CASCatch_CATCH(Standard_Failure) {
+#endif
res = 0.0;
MESSAGE( "Exception in integral calculating" );
}
#include <TopExp.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#define NO_CAS_CATCH
+#endif
+
#include <Standard_Failure.hxx>
+
+#ifdef NO_CAS_CATCH
#include <Standard_ErrorHandler.hxx>
+#else
+#include "CASCatch.hxx"
+#endif
using namespace std;
double val = table[i*2+1];
if( _convMode==0 )
{
+#ifdef NO_CAS_CATCH
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
#endif
val = pow( 10.0, val );
- }
- catch(Standard_Failure)
- {
+#ifdef NO_CAS_CATCH
+ } catch(Standard_Failure) {
+#else
+ } CASCatch_CATCH(Standard_Failure) {
+#endif
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
throw SALOME_Exception( LOCALIZED( "invalid value"));
return;
{
bool parsed_ok = true;
Handle( ExprIntrp_GenExp ) myExpr;
+#ifdef NO_CAS_CATCH
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
#endif
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( str.ToCString() );
- }
- catch(Standard_Failure)
- {
+#ifdef NO_CAS_CATCH
+ } catch(Standard_Failure) {
+#else
+ } CASCatch_CATCH(Standard_Failure) {
+#endif
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
parsed_ok = false;
}
#include <Expr_NamedUnknown.hxx>
#include <Expr_GeneralExpression.hxx>
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#define NO_CAS_CATCH
+#endif
+
#include <Standard_Failure.hxx>
+
+#ifdef NO_CAS_CATCH
#include <Standard_ErrorHandler.hxx>
+#else
+#include "CASCatch.hxx"
+#endif
StdMeshersGUI_DistrPreview::StdMeshersGUI_DistrPreview( QWidget* p, StdMeshers::StdMeshers_NumberOfSegments_ptr h )
: QwtPlot( p ),
delete[] y;
x = y = 0;
+#ifdef NO_CAS_CATCH
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
#endif
replot();
- }
- catch(Standard_Failure)
- {
+#ifdef NO_CAS_CATCH
+ } catch(Standard_Failure) {
+#else
+ } CASCatch_CATCH(Standard_Failure) {
+#endif
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
}
}
bool StdMeshersGUI_DistrPreview::init( const QString& str )
{
bool parsed_ok = true;
+#ifdef NO_CAS_CATCH
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
#endif
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( ( Standard_CString ) str.latin1() );
- }
- catch(Standard_Failure)
- {
+#ifdef NO_CAS_CATCH
+ } catch(Standard_Failure) {
+#else
+ } CASCatch_CATCH(Standard_Failure) {
+#endif
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
parsed_ok = false;
}
double res = 0.0;
ok = true;
+#ifdef NO_CAS_CATCH
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
#endif
res = myExpr->Expression()->Evaluate( myVars, myValues );
- }
- catch(Standard_Failure) {
+#ifdef NO_CAS_CATCH
+ } catch(Standard_Failure) {
+#else
+ } CASCatch_CATCH(Standard_Failure) {
+#endif
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
ok = false;
res = 0.0;
{
case EXPONENT:
{
+#ifdef NO_CAS_CATCH
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
#endif
// in StdMeshers_NumberOfSegments.cc
// const double PRECISION = 1e-7;
//
if(v < -7) v = -7.0;
v = pow( 10.0, v );
- }
- catch(Standard_Failure)
- {
+#ifdef NO_CAS_CATCH
+ } catch(Standard_Failure) {
+#else
+ } CASCatch_CATCH(Standard_Failure) {
+#endif
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
v = 0.0;
ok = false;