1
0
forked from GitHub/gf-core

added simple error handling in the Python test

This commit is contained in:
kr.angelov
2012-12-13 16:44:39 +00:00
parent 75c544027b
commit 0f0b7158c9

View File

@@ -18,6 +18,9 @@ while True:
sys.stdout.write("\n")
break;
for e in gr.languages["ParseEng"].parse(gr.startCat,line):
print e
print gr.languages["ParseEngBul"].linearize(e)
try:
for e in gr.languages["ParseEng"].parse(gr.startCat,line):
print e
print gr.languages["ParseEngBul"].linearize(e)
except pgf.ParseError as e:
print e.message