MCPcopy Index your code
hub / github.com/prompt-toolkit/ptpython / _handle_exception

Method _handle_exception

src/ptpython/repl.py:390–399  ·  view source on GitHub ↗
(self, e: BaseException)

Source from the content-addressed store, hash-verified

388 )
389
390 def _handle_exception(self, e: BaseException) -> None:
391 # Required for pdb.post_mortem() to work.
392 t, v, tb = sys.exc_info()
393 sys.last_type, sys.last_value, sys.last_traceback = t, v, tb
394
395 self._get_output_printer().display_exception(
396 e,
397 highlight=self.enable_syntax_highlighting,
398 paginate=self.enable_pager,
399 )
400
401 def _handle_keyboard_interrupt(self, e: KeyboardInterrupt) -> None:
402 output = self.app.output

Callers 2

Calls 2

_get_output_printerMethod · 0.95
display_exceptionMethod · 0.80

Tested by

no test coverage detected