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