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
Replaced the old execption handler by the new one.
[modules/gui.git]
/
src
/
Session
/
Session_SignalsHandler.cxx
diff --git
a/src/Session/Session_SignalsHandler.cxx
b/src/Session/Session_SignalsHandler.cxx
index c02f6132a9da1260b5fb470be72f220205bd7fd8..4eeface46272685d2716a12d3a4123d0f51c8452 100755
(executable)
--- a/
src/Session/Session_SignalsHandler.cxx
+++ b/
src/Session/Session_SignalsHandler.cxx
@@
-21,18
+21,25
@@
#include <stdexcept>
#include <qapplication.h>
#include <stdexcept>
#include <qapplication.h>
-#include "CASCatch_SignalsHandler.h" // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
-
+#include <CASCatch_CatchSignals.hxx>
+#include <CASCatch_ErrorHandler.hxx>
+#include <CASCatch_Failure.hxx>
extern "C" int HandleSignals(QApplication *theQApplication)
{
extern "C" int HandleSignals(QApplication *theQApplication)
{
- CASCatch_SignalsHandler aSignalsHandler;
- int aRet = -1;
- try {
+ int aRet = -1;
+ CASCatch_CatchSignals aCatchSignals;
+ aCatchSignals.Activate();
+
+ CASCatch_TRY {
aRet = theQApplication->exec();
aRet = theQApplication->exec();
- }catch(Standard_Failure){
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- throw std::runtime_error(aFail->GetMessageString());
}
}
+ CASCatch_CATCH(CASCatch_Failure) {
+ aCatchSignals.Deactivate();
+ Handle(CASCatch_Failure) aFail = CASCatch_Failure::Caught();
+ throw std::runtime_error( aFail->GetError() );
+ }
+
+ aCatchSignals.Deactivate();
return aRet;
}
return aRet;
}