/*!Create new SUIT_ExceptionHandler*/
extern "C" SALOMEAPP_EXPORT SUIT_ExceptionHandler* getExceptionHandler()
{
- return new SalomeApp_ExceptionHandler( true );
+ // 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;
+#ifdef _DEBUG_
+ raiseFPE = true;
+ char* envDisableFPE = getenv("DISABLE_FPE");
+ if (envDisableFPE && atoi(envDisableFPE))
+ raiseFPE = false;
+#else
+ raiseFPE = false;
+#endif
+ return new SalomeApp_ExceptionHandler( raiseFPE );
}