diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2012-12-13 16:44:39 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2012-12-13 16:44:39 +0000 |
| commit | 0f0b7158c97cbeb561e6d292b9361536d93f5195 (patch) | |
| tree | d329fd0f67cb7527a4478eb298a79ff38c4e9f0a /src/runtime/python | |
| parent | 75c544027b828e5adccb7dd16d078399067363b9 (diff) | |
added simple error handling in the Python test
Diffstat (limited to 'src/runtime/python')
| -rw-r--r-- | src/runtime/python/test.py | 9 |
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 |
