X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshersGUI%2FStdMeshersGUI_DistrPreview.cxx;fp=src%2FStdMeshersGUI%2FStdMeshersGUI_DistrPreview.cxx;h=c1da2017a5ebaa1820f6a22461802825a19c105b;hp=e1a410cbaaa36e60cb73d82112ab522f4e641c4e;hb=057dae0b9ee21613544f7949ac5f2d0651aef67f;hpb=9ab6519addd0dab8afeb22a18afdb4583bfb7e02 diff --git a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx index e1a410cba..c1da2017a 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx @@ -19,11 +19,13 @@ // #include "StdMeshersGUI_DistrPreview.h" -#include "CASCatch.hxx" #include #include +#include +#include + StdMeshersGUI_DistrPreview::StdMeshersGUI_DistrPreview( QWidget* p, StdMeshers::StdMeshers_NumberOfSegments_ptr h ) : QwtPlot( p ), myPoints( 50 ), @@ -240,11 +242,11 @@ void StdMeshersGUI_DistrPreview::update() delete[] y; x = y = 0; - CASCatch_TRY - { + try { + OCC_CATCH_SIGNALS; replot(); } - CASCatch_CATCH(Standard_Failure) + catch(Standard_Failure) { Handle(Standard_Failure) aFail = Standard_Failure::Caught(); } @@ -285,12 +287,12 @@ bool isCorrectArg( const Handle( Expr_GeneralExpression )& expr ) bool StdMeshersGUI_DistrPreview::init( const QString& str ) { bool parsed_ok = true; - CASCatch_TRY - { + try { + OCC_CATCH_SIGNALS; myExpr = ExprIntrp_GenExp::Create(); myExpr->Process( ( Standard_CString ) str.latin1() ); } - CASCatch_CATCH(Standard_Failure) + catch(Standard_Failure) { Handle(Standard_Failure) aFail = Standard_Failure::Caught(); parsed_ok = false; @@ -327,10 +329,11 @@ double StdMeshersGUI_DistrPreview::calc( bool& ok ) double res = 0.0; ok = true; - CASCatch_TRY { + try { + OCC_CATCH_SIGNALS; res = myExpr->Expression()->Evaluate( myVars, myValues ); } - CASCatch_CATCH(Standard_Failure) { + catch(Standard_Failure) { Handle(Standard_Failure) aFail = Standard_Failure::Caught(); ok = false; res = 0.0; @@ -351,15 +354,15 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const { case EXPONENT: { - CASCatch_TRY - { + try { + OCC_CATCH_SIGNALS; // in StdMeshers_NumberOfSegments.cc // const double PRECISION = 1e-7; // if(v < -7) v = -7.0; v = pow( 10.0, v ); } - CASCatch_CATCH(Standard_Failure) + catch(Standard_Failure) { Handle(Standard_Failure) aFail = Standard_Failure::Caught(); v = 0.0;