[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 9d1958475e
commit a7522c384e
16 changed files with 26 additions and 26 deletions

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