diff --git a/src/Mod/PartDesign/FeatureHole/FeatureHole.py b/src/Mod/PartDesign/FeatureHole/FeatureHole.py index a4cc7275c3..da4d520d8f 100644 --- a/src/Mod/PartDesign/FeatureHole/FeatureHole.py +++ b/src/Mod/PartDesign/FeatureHole/FeatureHole.py @@ -153,7 +153,7 @@ class Hole(): secondLineIndex = i if (firstLineIndex > -1) and (secondLineIndex > -1): break - except: + except Exception: # Unknown curvetype GeomAbs_OtherCurve continue axis.References = [(support, elementList[0]), (support, "Edge" + str(firstLineIndex+1)), (support, "Edge" + str(secondLineIndex+1))] diff --git a/src/Mod/PartDesign/FeatureHole/TaskHole.py b/src/Mod/PartDesign/FeatureHole/TaskHole.py index b0752d356a..6805cb27bd 100644 --- a/src/Mod/PartDesign/FeatureHole/TaskHole.py +++ b/src/Mod/PartDesign/FeatureHole/TaskHole.py @@ -61,7 +61,7 @@ class TaskHole: body.removeObject(sketch) try: document.removeObject(sketch.Name) - except: + except Exception: pass # This always throws an exception: "Sketch support has been deleted" from SketchObject::execute() body.removeObject(plane) document.removeObject(plane.Name)