提交 5dd7365e authored 作者: delallea's avatar delallea

Merge pull request #20 from nouiz/fix_except

Fix catching of exception.
...@@ -314,7 +314,7 @@ def streamline(env, thunks, order, post_thunk_old_storage = None, no_recycling = ...@@ -314,7 +314,7 @@ def streamline(env, thunks, order, post_thunk_old_storage = None, no_recycling =
thunk() thunk()
for old_s in old_storage: for old_s in old_storage:
old_s[0] = None old_s[0] = None
except: except Exception:
raise_with_op(node) raise_with_op(node)
f = streamline_default_f f = streamline_default_f
elif nice_errors: elif nice_errors:
...@@ -325,7 +325,7 @@ def streamline(env, thunks, order, post_thunk_old_storage = None, no_recycling = ...@@ -325,7 +325,7 @@ def streamline(env, thunks, order, post_thunk_old_storage = None, no_recycling =
try: try:
for thunk, node in thunk_node_list: for thunk, node in thunk_node_list:
thunk() thunk()
except: except Exception:
raise_with_op(node) raise_with_op(node)
f = streamline_nice_errors_f f = streamline_nice_errors_f
else: else:
...@@ -585,7 +585,7 @@ class WrapLinker(Linker): ...@@ -585,7 +585,7 @@ class WrapLinker(Linker):
for i, (thunks, node) in enumerate(zip(thunk_groups, order)): for i, (thunks, node) in enumerate(zip(thunk_groups, order)):
try: try:
wrapper(i, node, *thunks) wrapper(i, node, *thunks)
except: except Exception:
raise_with_op(node) raise_with_op(node)
f.thunk_groups = thunk_groups f.thunk_groups = thunk_groups
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论