Skip to content

Commit

Permalink
Handle exceptions better
Browse files Browse the repository at this point in the history
Communicate back that cell execution was aborted in case of exception during
cell replay.
  • Loading branch information
Kirill888 committed Oct 19, 2019
1 parent d0644d9 commit 1d84042
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jupyter_ui_poll/_poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ def _replay_events(shell, events):
sys.stderr.flush()
for stream, ident, parent in events:
kernel.set_parent(ident, parent)
kernel.execute_request(stream, ident, parent)
if shell._last_traceback is not None:
# there was an exception drop rest on the floor
break
if kernel._aborting:
kernel._send_abort_reply(stream, parent, ident)
else:
kernel.execute_request(stream, ident, parent)


@contextmanager
Expand Down

0 comments on commit 1d84042

Please sign in to comment.