issue #1700 replace raise Exception()
This commit is contained in:
@@ -32,7 +32,7 @@ class Epitrochoid:
|
||||
z=0
|
||||
|
||||
if r2 == 0:
|
||||
raise Exception("Exterior radius must not be zero")
|
||||
raise ValueError("Exterior radius must not be zero")
|
||||
|
||||
for i in range(steps):
|
||||
if i==0:
|
||||
@@ -66,4 +66,4 @@ def makeEpitrochoid():
|
||||
doc.recompute()
|
||||
|
||||
if __name__ == "__main__": #feature will be generated after macro execution
|
||||
makeEpitrochoid()
|
||||
makeEpitrochoid()
|
||||
|
||||
@@ -75,7 +75,7 @@ def makeFilletArc(M1,P,Q,N,r2,ccw):
|
||||
cc = 2.0 * r2 * (b.dot(v)-r1)
|
||||
dd = uv * uv - uu * cc
|
||||
if dd < 0:
|
||||
raise Exception("Unable to caluclate intersection points")
|
||||
raise RuntimeError("Unable to caluclate intersection points")
|
||||
t1 = (-uv + math.sqrt(dd)) / uu
|
||||
t2 = (-uv - math.sqrt(dd)) / uu
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ def makeRadialCopy():
|
||||
sel = sel[0]
|
||||
shape = sel.Shape
|
||||
name = sel.Label
|
||||
except:
|
||||
except IndexError, AttributeError:
|
||||
QtGui.QMessageBox.critical(None,"Wrong selection","Please select a shape object")
|
||||
#raise Exception("Nothing selected")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user