Go back to only logging crashes if no pdb gets engaged

pre_bad_close
Tyler Goodlet 2021-06-29 15:55:03 -04:00
parent 900f04a31d
commit ecefca8756
1 changed files with 10 additions and 6 deletions

View File

@ -207,19 +207,23 @@ async def _invoke(
# if not isinstance(err, trio.ClosedResourceError) and ( # if not isinstance(err, trio.ClosedResourceError) and (
# if not is_multi_cancelled(err) and ( # if not is_multi_cancelled(err) and (
entered_debug: bool = False
if not isinstance(err, ContextCancelled) or ( if not isinstance(err, ContextCancelled) or (
isinstance(err, ContextCancelled) and ctx._cancel_called isinstance(err, ContextCancelled) and ctx._cancel_called
): ):
# XXX: is there any case where we'll want to debug IPC # XXX: is there any case where we'll want to debug IPC
# disconnects? I can't think of a reason that inspecting # disconnects as a default?
#
# I can't think of a reason that inspecting
# this type of failure will be useful for respawns or # this type of failure will be useful for respawns or
# recovery logic - the only case is some kind of strange bug # recovery logic - the only case is some kind of strange bug
# in `trio` itself? # in our transport layer itself? Going to keep this
await _debug._maybe_enter_pm(err) # open ended for now.
# entered = await _debug._maybe_enter_pm(err) entered_debug = await _debug._maybe_enter_pm(err)
# if not entered:
# log.exception("Actor crashed:") if not entered_debug:
log.exception("Actor crashed:")
# always ship errors back to caller # always ship errors back to caller
err_msg = pack_error(err, tb=tb) err_msg = pack_error(err, tb=tb)