Ignore kbis in `open_crash_handler()` by default

multihomed
Tyler Goodlet 2023-10-16 15:45:34 -04:00
parent 07cec02303
commit ae326cbb9a
1 changed files with 13 additions and 6 deletions

View File

@ -1041,15 +1041,19 @@ async def maybe_wait_for_debugger(
# TODO: better naming and what additionals?
# - optional runtime plugging?
# - detection for sync vs. async code?
# - specialized REPL entry when in distributed mode?
# - [ ] optional runtime plugging?
# - [ ] detection for sync vs. async code?
# - [ ] specialized REPL entry when in distributed mode?
# - [x] allow ignoring kbi Bo
@cm
def open_crash_handler(
catch: set[BaseException] = {
Exception,
BaseException,
}
},
ignore: set[BaseException] = {
KeyboardInterrupt,
},
):
'''
Generic "post mortem" crash handler using `pdbp` REPL debugger.
@ -1064,8 +1068,11 @@ def open_crash_handler(
'''
try:
yield
except tuple(catch):
except tuple(catch) as err:
if type(err) not in ignore:
pdbp.xpm()
raise