Salome HOME
Add missing resource item
[modules/gui.git] / src / SalomeApp / SalomeApp_ExceptionHandler.cxx
index bf868e0bfe697d272807a208f2ea34fb3628b110..acb5263d6f7d238f73c09d31ac45413220aff31d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -21,6 +21,7 @@
 //
 
 #include "SalomeApp_ExceptionHandler.h"
+#include "Utils_CorbaException.hxx"
 
 #include "CASCatch.hxx"
 #include "Basics_OCCTVersion.hxx"
@@ -93,6 +94,10 @@ bool SalomeApp_ExceptionHandler::handle( QObject* o, QEvent* e )
   {
     showMessage( title, QString( e.GetMessageString() ) );
   }
+  catch( SALOME::SALOME_Exception& ex)
+  {
+    showMessage( title, QString( ex.details.text));
+  }
 #ifndef WIN32
   catch(...)
   {
@@ -110,7 +115,7 @@ extern "C" SALOMEAPP_EXPORT SUIT_ExceptionHandler* getExceptionHandler()
   // 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 WNT default settings
+#if defined(_DEBUG_) | defined(_DEBUG) //the Last for WIN32 default settings
   raiseFPE = true;
   char* envDisableFPE = getenv("DISABLE_FPE");
   if (envDisableFPE && atoi(envDisableFPE))