Skip to content

Commit

Permalink
Backport PR #12413: catch unrecoverable error
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau authored and meeseeksmachine committed Aug 29, 2020
1 parent 7f87cb9 commit 075cbef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions IPython/terminal/ptutils.py
Expand Up @@ -112,8 +112,11 @@ def get_completions(self, document, complete_event):
try:
yield from self._get_completions(body, offset, cursor_position, self.ipy_completer)
except Exception as e:
from traceback import print_tb
print_tb(e)
try:
exc_type, exc_value, exc_tb = sys.exc_info()
traceback.print_exception(exc_type, exc_value, exc_tb)
except AttributeError:
print('Unrecoverable Error in completions')

@staticmethod
def _get_completions(body, offset, cursor_position, ipyc):
Expand Down

0 comments on commit 075cbef

Please sign in to comment.