Exception hook which handles `BdbQuit` exceptions. All other exceptions are processed using the `excepthook` parameter.
(et, ev, tb, excepthook=None)
| 60 | |
| 61 | |
| 62 | def BdbQuit_excepthook(et, ev, tb, excepthook=None): |
| 63 | """Exception hook which handles `BdbQuit` exceptions. |
| 64 | |
| 65 | All other exceptions are processed using the `excepthook` |
| 66 | parameter. |
| 67 | """ |
| 68 | warnings.warn("`BdbQuit_excepthook` is deprecated since version 5.1", |
| 69 | DeprecationWarning, stacklevel=2) |
| 70 | if et==bdb.BdbQuit: |
| 71 | print('Exiting Debugger.') |
| 72 | elif excepthook is not None: |
| 73 | excepthook(et, ev, tb) |
| 74 | else: |
| 75 | # Backwards compatibility. Raise deprecation warning? |
| 76 | BdbQuit_excepthook.excepthook_ori(et,ev,tb) |
| 77 | |
| 78 | |
| 79 | def BdbQuit_IPython_excepthook(self,et,ev,tb,tb_offset=None): |