提交 3c2fb385 authored 作者: David Warde-Farley's avatar David Warde-Farley

Add some in-body comments about 'except Exception:' business.

上级 5dd7365e
......@@ -314,6 +314,7 @@ def streamline(env, thunks, order, post_thunk_old_storage = None, no_recycling =
thunk()
for old_s in old_storage:
old_s[0] = None
# N.B.: used instead of except: to not catch KeyboardInterrupt
except Exception:
raise_with_op(node)
f = streamline_default_f
......@@ -325,6 +326,7 @@ def streamline(env, thunks, order, post_thunk_old_storage = None, no_recycling =
try:
for thunk, node in thunk_node_list:
thunk()
# N.B.: used instead of except: to not catch KeyboardInterrupt
except Exception:
raise_with_op(node)
f = streamline_nice_errors_f
......@@ -585,6 +587,7 @@ class WrapLinker(Linker):
for i, (thunks, node) in enumerate(zip(thunk_groups, order)):
try:
wrapper(i, node, *thunks)
# N.B.: used instead of except: to not catch KeyboardInterrupt
except Exception:
raise_with_op(node)
f.thunk_groups = thunk_groups
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论