+ // 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;
+ raiseFPE = false;
+
+#if defined(_DEBUG_) | defined(_DEBUG) //the Last for WIN32 default settings
+ char* envEnableFPE = getenv("ENABLE_FPE");
+ if (envEnableFPE && atoi(envEnableFPE))
+ raiseFPE = true;
+#endif
+
+ return new SalomeApp_ExceptionHandler( raiseFPE );