[DRAFT] Catch only Exception, not BaseException

This commit is contained in:
Chris Hennes
2021-02-10 14:08:56 -06:00
committed by wwmayer
parent 8228d64ac4
commit fe7e45a7de
16 changed files with 26 additions and 26 deletions

View File

@@ -79,7 +79,7 @@ class Clone(DraftObject):
try:
sh = shapes[0].multiFuse(shapes[1:])
sh = sh.removeSplitter()
except:
except Exception:
pass
else:
return sh

View File

@@ -546,7 +546,7 @@ def calculate_placement(globalRotation,
try:
t = edge.tangentAt(get_parameter_from_v0(edge, offset))
t.normalize()
except:
except Exception:
_wrn(_tr("Cannot calculate path tangent. Copy not aligned."))
return placement
@@ -560,7 +560,7 @@ def calculate_placement(globalRotation,
try:
b = t.cross(n)
b.normalize()
except:
except Exception:
# weird special case, tangent and normal parallel
b = nullv
_wrn(_tr("Tangent and normal are parallel. Copy not aligned."))
@@ -585,7 +585,7 @@ def calculate_placement(globalRotation,
try:
b = t.cross(n)
b.normalize()
except:
except Exception:
b = nullv
_wrn(_tr("Cannot calculate path binormal. Copy not aligned."))
return placement

View File

@@ -150,7 +150,7 @@ class ShapeString(DraftObject):
# some fonts fail here
if face.Surface.Axis.z < 0.0:
face.reverse()
except:
except Exception:
pass
compFaces.append(face)
ret = Part.Compound(compFaces)