From 3182ffb648bfb4ef5590ac2c1bc066a817f96f9b Mon Sep 17 00:00:00 2001 From: Adrien Bruneton Date: Thu, 13 Feb 2014 10:22:51 +0100 Subject: [PATCH] Porting to PV4.1: change behavior of SIGFPE: PV4.1 needs to deal with +/-inf double values. Changed behavior so that by default SIGFPE is not raised. Only if env variable ENABLE_FPE is set will the signal FPE be raised (but PARAVIS is then unusable). --- src/SalomeApp/SalomeApp_ExceptionHandler.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx index acb5263d6..88e448bac 100644 --- a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx +++ b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx @@ -115,13 +115,12 @@ 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 WIN32 default settings - raiseFPE = true; - char* envDisableFPE = getenv("DISABLE_FPE"); - if (envDisableFPE && atoi(envDisableFPE)) - raiseFPE = false; -#else 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 ); -- 2.39.2