issue #1700 replace raise Exception()

This commit is contained in:
Sebastian Hoogen
2014-08-24 14:33:10 +02:00
parent b0a7b0f274
commit c7cfee0539
19 changed files with 38 additions and 37 deletions

View File

@@ -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()

View File

@@ -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

View File

@@ -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: