浏览代码

gw: Assertion errors should not be caught and should still backtrace.
Ditto for IndexError (and maybe others in future).

Keir Fraser 4 年之前
父节点
当前提交
55325700cb
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      scripts/gw.py

+ 2 - 0
scripts/gw.py

@@ -60,6 +60,8 @@ try:
     res = main(argv)
     res = main(argv)
     if res is None:
     if res is None:
         res = 0
         res = 0
+except (IndexError, AssertionError):
+    raise
 except Exception as err:
 except Exception as err:
     print("** FATAL ERROR:")
     print("** FATAL ERROR:")
     print(err)
     print(err)