summaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2012-12-13 16:44:39 +0000
committerkr.angelov <kr.angelov@gmail.com>2012-12-13 16:44:39 +0000
commit0f0b7158c97cbeb561e6d292b9361536d93f5195 (patch)
treed329fd0f67cb7527a4478eb298a79ff38c4e9f0a /src/runtime
parent75c544027b828e5adccb7dd16d078399067363b9 (diff)
added simple error handling in the Python test
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/python/test.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/runtime/python/test.py b/src/runtime/python/test.py
index 95b450194..cb0ba5452 100644
--- a/src/runtime/python/test.py
+++ b/src/runtime/python/test.py
@@ -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