Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit '4bda6c883bff2af152b1de8d7f6d4820780c2cd2'
[modules/gui.git]
/
src
/
SalomeApp
/
SalomeApp_ExceptionHandler.cxx
diff --git
a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx
b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx
index d068f29c3a391b17cd5f352e19dbbe8097c37d2a..5c9b67f4c95bb3ae232598fb2a9624a3b11c6b6d 100644
(file)
--- a/
src/SalomeApp/SalomeApp_ExceptionHandler.cxx
+++ b/
src/SalomeApp/SalomeApp_ExceptionHandler.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
14 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-20
23 CEA, EDF
, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-23,9
+23,6
@@
#include "SalomeApp_ExceptionHandler.h"
#include "Utils_CorbaException.hxx"
#include "SalomeApp_ExceptionHandler.h"
#include "Utils_CorbaException.hxx"
-#include "CASCatch.hxx"
-#include "Basics_OCCTVersion.hxx"
-
#include <OSD.hxx>
#include <stdexcept>
#include <OSD.hxx>
#include <stdexcept>
@@
-33,12
+30,9
@@
#include <QString>
#include <QString>
-#if OCC_VERSION_LARGE > 0x06010000
- #include <Standard_ErrorHandler.hxx>
- #include <Standard_Failure.hxx>
-#else
- #include "CASCatch.hxx"
-#endif
+#include <Standard_ErrorHandler.hxx>
+#include <Standard_Failure.hxx>
+
/*!Constructor. Initialize by \a floatSignal.*/
SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal )
/*!Constructor. Initialize by \a floatSignal.*/
SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal )
@@
-57,24
+51,19
@@
SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal )
/*!Try to call SUIT_ExceptionHandler::internalHandle(o, e), catch if failure.*/
bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e )
{
/*!Try to call SUIT_ExceptionHandler::internalHandle(o, e), catch if failure.*/
bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e )
{
-#if OCC_VERSION_LARGE > 0x06010000
- try {
+ bool result = true;
+
+ try
+ {
OCC_CATCH_SIGNALS;
OCC_CATCH_SIGNALS;
-#else
- CASCatch_TRY {
-#endif
- SUIT_ExceptionHandler::internalHandle( o, e );
+ result = SUIT_ExceptionHandler::internalHandle( o, e );
}
}
-#if OCC_VERSION_LARGE > 0x06010000
- catch(Standard_Failure) {
-#else
- CASCatch_CATCH(Standard_Failure) {
-#endif
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- throw Standard_Failure( aFail->GetMessageString() );
+ catch( Standard_Failure& e )
+ {
+ throw Standard_Failure( e.GetMessageString() );
}
}
- return
true
;
+ return
result
;
}
/*!Try to call handleSignals( o, e ), catch and show error message.*/
}
/*!Try to call handleSignals( o, e ), catch and show error message.*/
@@
-109,19
+98,18
@@
bool SalomeApp_ExceptionHandler::handle( QObject* o, QEvent* e )
}
/*!Create new SUIT_ExceptionHandler*/
}
/*!Create new SUIT_ExceptionHandler*/
-extern "C" SALOMEAPP_EXPORT SUIT_ExceptionHandler* getExceptionHandler()
+extern "C" SALOMEAPP
IMPL
_EXPORT SUIT_ExceptionHandler* getExceptionHandler()
{
// MSV 2006-04-26: work around PAL12004 "VTK window => SIGFPE Arithmetic Exception Detected"
// We disable FPE signal as it was in earlier versions of SALOME. It is enabled
// only in debug mode if the environment variable DISABLE_FPE is not set to 1.
bool raiseFPE;
{
// MSV 2006-04-26: work around PAL12004 "VTK window => SIGFPE Arithmetic Exception Detected"
// We disable FPE signal as it was in earlier versions of SALOME. It is enabled
// only in debug mode if the environment variable DISABLE_FPE is not set to 1.
bool raiseFPE;
-#if defined(_DEBUG_) | defined(_DEBUG) //the Last for WIN32 default settings
- raiseFPE = true;
- char* envDisableFPE = getenv("DISABLE_FPE");
- if (envDisableFPE && atoi(envDisableFPE))
- raiseFPE = false;
-#else
raiseFPE = false;
raiseFPE = false;
+
+#if defined(_DEBUG_) | defined(_DEBUG) //the Last for WIN32 default settings
+ char* envEnableFPE = getenv("ENABLE_FPE");
+ if (envEnableFPE && atoi(envEnableFPE))
+ raiseFPE = true;
#endif
return new SalomeApp_ExceptionHandler( raiseFPE );
#endif
return new SalomeApp_ExceptionHandler( raiseFPE );