Commit ab06a7ed authored by Daniel Brown's avatar Daniel Brown
Browse files

better error handling

parent 6012c613
......@@ -66,13 +66,15 @@ class gauss(object):
elif len(values) == 8:
gpx = gauss_param(z=values[-4], zr=values[-3])
gpy = gauss_param(z=values[-2], zr=values[-1])
else:
elif values[0].endswith("**"):
if len(values) == 6:
gp = gauss_param(w=values[-2], rc=values[-1])
elif len(values) == 8:
gpx = gauss_param(w=values[-4], rc=values[-3])
gpy = gauss_param(w=values[-2], rc=values[-1])
else:
raise pkex.BasePyKatException("Unexpected ending to gauss command '{0}'".format(text))
if len(values) == 6:
kat.nodes[node].setGauss(kat.components[component], gp)
else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment