Skip to content

Commit

Permalink
Merge pull request #12524 from meeseeksmachine/auto-backport-of-pr-12…
Browse files Browse the repository at this point in the history
…413-on-7.x

Backport PR #12413 on branch 7.x (catch unrecoverable error)
  • Loading branch information
Carreau committed Aug 29, 2020
2 parents 6e65c1a + 075cbef commit 9c3c238
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 9c3c238

Please sign in to comment.