diff --git a/src/Mod/Drawing/App/CMakeLists.txt b/src/Mod/Drawing/App/CMakeLists.txt index 00710b75e..06d6ca7d2 100644 --- a/src/Mod/Drawing/App/CMakeLists.txt +++ b/src/Mod/Drawing/App/CMakeLists.txt @@ -65,12 +65,6 @@ if(MSVC) ADD_MSVC_PRECOMPILED_HEADER("PreCompiled.h" "PreCompiled.cpp" Drawing_CPP_SRCS) endif(MSVC) -# Set special compiler flag to convert a SIGSEV into an exception -# to handle issue #0000478. -IF(MSVC) -SET_SOURCE_FILES_PROPERTIES(ProjectionAlgos.cpp PROPERTIES COMPILE_FLAGS "/EHa") -ENDIF(MSVC) - add_library(Drawing SHARED ${Drawing_SRCS} ${Features_SRCS} ${DrawingAlgos_SRCS}) target_link_libraries(Drawing ${Drawing_LIBS}) @@ -94,6 +88,9 @@ if(MSVC) set_target_properties(Drawing PROPERTIES DEBUG_OUTPUT_NAME "Drawing_d") set_target_properties(Drawing PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Mod/Drawing) set_target_properties(Drawing PROPERTIES PREFIX "../") + # Set special compiler flag to convert a SIGSEV into an exception + # to fix issue #0000478 + set_target_properties(Drawing PROPERTIES COMPILE_FLAGS "/EHa") elseif(MINGW) set_target_properties(Drawing PROPERTIES SUFFIX ".pyd") set_target_properties(Drawing PROPERTIES DEBUG_OUTPUT_NAME "Drawing_d") diff --git a/src/Mod/Drawing/App/FeatureView.cpp b/src/Mod/Drawing/App/FeatureView.cpp index fea2121a8..e570ca46f 100644 --- a/src/Mod/Drawing/App/FeatureView.cpp +++ b/src/Mod/Drawing/App/FeatureView.cpp @@ -25,6 +25,7 @@ #ifndef _PreComp_ # include +# include #endif @@ -63,6 +64,19 @@ FeatureView::~FeatureView() { } +App::DocumentObjectExecReturn *FeatureView::recompute(void) +{ + try { + return App::DocumentObject::recompute(); + } + catch (Standard_Failure) { + Handle_Standard_Failure e = Standard_Failure::Caught(); + App::DocumentObjectExecReturn* ret = new App::DocumentObjectExecReturn(e->GetMessageString()); + if (ret->Why.empty()) ret->Why = "Unknown OCC exception"; + return ret; + } +} + App::DocumentObjectExecReturn *FeatureView::execute(void) { return App::DocumentObject::StdReturn; diff --git a/src/Mod/Drawing/App/FeatureView.h b/src/Mod/Drawing/App/FeatureView.h index 5b3d23950..9d4607fff 100644 --- a/src/Mod/Drawing/App/FeatureView.h +++ b/src/Mod/Drawing/App/FeatureView.h @@ -55,6 +55,7 @@ public: /** @name methods overide Feature */ //@{ /// recalculate the Feature + virtual App::DocumentObjectExecReturn *recompute(void); virtual App::DocumentObjectExecReturn *execute(void); //@} diff --git a/src/Mod/Part/App/CMakeLists.txt b/src/Mod/Part/App/CMakeLists.txt index e337bebb9..391bb6023 100644 --- a/src/Mod/Part/App/CMakeLists.txt +++ b/src/Mod/Part/App/CMakeLists.txt @@ -127,14 +127,6 @@ SET(Features_SRCS ) SOURCE_GROUP("Features" FILES ${Features_SRCS}) -# Set special compiler flag to convert a SIGSEV into an exception -# to fix issue #0000215. -IF(MSVC) -SET_SOURCE_FILES_PROPERTIES(FeatureFillet.cpp PROPERTIES COMPILE_FLAGS "/EHa") -SET_SOURCE_FILES_PROPERTIES(FeaturePartBoolean.cpp PROPERTIES COMPILE_FLAGS "/EHa") -SET_SOURCE_FILES_PROPERTIES(FeatureExtrusion.cpp PROPERTIES COMPILE_FLAGS "/EHa") -ENDIF(MSVC) - SET(Properties_SRCS PropertyTopoShape.cpp PropertyTopoShape.h @@ -270,6 +262,9 @@ if(MSVC) set_target_properties(Part PROPERTIES DEBUG_OUTPUT_NAME "Part_d") set_target_properties(Part PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Mod/Part) set_target_properties(Part PROPERTIES PREFIX "../") + # Set special compiler flag to convert a SIGSEV into an exception + # to fix issue #0000215, #0001155, ... + set_target_properties(Part PROPERTIES COMPILE_FLAGS "/EHa") elseif(MINGW) set_target_properties(Part PROPERTIES SUFFIX ".pyd") set_target_properties(Part PROPERTIES DEBUG_OUTPUT_NAME "Part_d")