diff -r 54ef571cf72a -r a6a7036f3c6f py/gadict_c5.py --- a/py/gadict_c5.py Sun Mar 27 22:36:19 2016 +0300 +++ b/py/gadict_c5.py Sun Mar 27 22:43:45 2016 +0300 @@ -19,8 +19,16 @@ parser = gadict.Parser() -dom = parser.parse(fin) -fin.close() +try: + dom = parser.parse(fin) +except gadict.ParseException as ex: + sys.stdout.write("{:s}{:s}\n".format(fgadict, repr(ex))) + if __debug__: + import traceback + traceback.print_exc() + exit(1) +finally: + fin.close() for idx in range(1, len(dom)): article = dom[idx]