Go back to only logging crashes if no pdb gets engaged
parent
4800dfe12e
commit
668d785f74
|
@ -195,19 +195,32 @@ async def _invoke(
|
||||||
|
|
||||||
except (Exception, trio.MultiError) as err:
|
except (Exception, trio.MultiError) as err:
|
||||||
|
|
||||||
# TODO: maybe we'll want differnet "levels" of debugging
|
if not is_multi_cancelled(err):
|
||||||
|
|
||||||
|
log.exception("Actor crashed:")
|
||||||
|
|
||||||
|
# TODO: maybe we'll want different "levels" of debugging
|
||||||
# eventualy such as ('app', 'supervisory', 'runtime') ?
|
# eventualy such as ('app', 'supervisory', 'runtime') ?
|
||||||
if not isinstance(err, trio.ClosedResourceError) and (
|
|
||||||
not is_multi_cancelled(err)) and (
|
# if not isinstance(err, trio.ClosedResourceError) and (
|
||||||
not isinstance(err, ContextCancelled)
|
# if not is_multi_cancelled(err) and (
|
||||||
|
|
||||||
|
entered_debug: bool = False
|
||||||
|
if not isinstance(err, ContextCancelled) or (
|
||||||
|
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
|
||||||
entered = await _debug._maybe_enter_pm(err)
|
# open ended for now.
|
||||||
if not entered:
|
|
||||||
|
entered_debug = await _debug._maybe_enter_pm(err)
|
||||||
|
|
||||||
|
if not entered_debug:
|
||||||
log.exception("Actor crashed:")
|
log.exception("Actor crashed:")
|
||||||
|
|
||||||
# always ship errors back to caller
|
# always ship errors back to caller
|
||||||
|
|
Loading…
Reference in New Issue