X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSession%2FSession_SignalsHandler.cxx;h=4eeface46272685d2716a12d3a4123d0f51c8452;hb=c0388d8f5bc9dc9cb1a6bd5e9feefa1483322cf2;hp=c02f6132a9da1260b5fb470be72f220205bd7fd8;hpb=2e750f9ded92337bc3c44e9d7388180974cc4a43;p=modules%2Fgui.git diff --git a/src/Session/Session_SignalsHandler.cxx b/src/Session/Session_SignalsHandler.cxx index c02f6132a..4eeface46 100755 --- a/src/Session/Session_SignalsHandler.cxx +++ b/src/Session/Session_SignalsHandler.cxx @@ -21,18 +21,25 @@ #include #include -#include "CASCatch_SignalsHandler.h" // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC - +#include +#include +#include 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(); - }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; }