[DRAFT] Catch only Exception, not BaseException
This commit is contained in:
@@ -79,7 +79,7 @@ class Clone(DraftObject):
|
||||
try:
|
||||
sh = shapes[0].multiFuse(shapes[1:])
|
||||
sh = sh.removeSplitter()
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
return sh
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user