// See http://www.salome-platform.org/
//
#include "SalomeApp_ExceptionHandler.h"
+#include "CASCatch_CatchSignals.hxx"
#include <OSD.hxx>
-#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
-
#include <stdexcept>
#include <exception>
#include <qstring.h>
-#include <CASCatch_CatchSignals.hxx>
-#include <CASCatch_ErrorHandler.hxx>
-#include <CASCatch_Failure.hxx>
-
-
/*!Constructor. Initialize by \a floatSignal.*/
SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal )
: SUIT_ExceptionHandler()
{
CASCatch_CatchSignals aCatchSignals;
- aCatchSignals.Activate();
-
-
+
CASCatch_TRY {
SUIT_ExceptionHandler::internalHandle( o, e );
}
- CASCatch_CATCH(CASCatch_Failure) {
- aCatchSignals.Deactivate();
- Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();
- throw std::runtime_error( aFail->GetError() );
+ CASCatch_CATCH(Standard_Failure) {
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ throw Standard_Failure( aFail->GetMessageString() );
}
- aCatchSignals.Deactivate();
return true;
}
-#ifdef try
-#undef try
-#endif
-
-#ifdef catch
-#undef catch
-#endif
-
/*!Try to call handleSignals( o, e ), catch and show error message.*/
bool SalomeApp_ExceptionHandler::handle( QObject* o, QEvent* e )
{