Skip to content

Commit

Permalink
Merge pull request #22 from dwf/add_except_exception_comments
Browse files Browse the repository at this point in the history
Add some in-body comments about 'except Exception:' business.
  • Loading branch information
delallea committed Sep 1, 2011
2 parents 5dd7365 + 3c2fb38 commit 15e5ae6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions theano/gof/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ def streamline_default_f():
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
Expand All @@ -325,6 +326,7 @@ def streamline_nice_errors_f():
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
Expand Down Expand Up @@ -585,6 +587,7 @@ def f():
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
Expand Down

0 comments on commit 15e5ae6

Please sign in to comment.