Go back to only logging crashes if no pdb gets engaged
parent
3179eded73
commit
9b4f7a3076
|
@ -28,6 +28,7 @@ from ._exceptions import (
|
||||||
ModuleNotExposed,
|
ModuleNotExposed,
|
||||||
is_multi_cancelled,
|
is_multi_cancelled,
|
||||||
TransportClosed,
|
TransportClosed,
|
||||||
|
ContextCancelled,
|
||||||
)
|
)
|
||||||
from . import _debug
|
from . import _debug
|
||||||
from ._discovery import get_arbiter
|
from ._discovery import get_arbiter
|
||||||
|
@ -125,18 +126,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):
|
||||||
# eventualy such as ('app', 'supervisory', 'runtime') ?
|
|
||||||
if not isinstance(err, trio.ClosedResourceError) and (
|
log.exception("Actor crashed:")
|
||||||
not is_multi_cancelled(err)
|
|
||||||
):
|
# TODO: maybe we'll want different "levels" of debugging
|
||||||
# XXX: is there any case where we'll want to debug IPC
|
# eventualy such as ('app', 'supervisory', 'runtime') ?
|
||||||
# disconnects? I can't think of a reason that inspecting
|
|
||||||
# this type of failure will be useful for respawns or
|
# if not isinstance(err, trio.ClosedResourceError) and (
|
||||||
# recovery logic - the only case is some kind of strange bug
|
# if not is_multi_cancelled(err) and (
|
||||||
# in `trio` itself?
|
|
||||||
entered = await _debug._maybe_enter_pm(err)
|
entered_debug: bool = False
|
||||||
if not entered:
|
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
|
||||||
|
# disconnects as a default?
|
||||||
|
#
|
||||||
|
# I can't think of a reason that inspecting
|
||||||
|
# this type of failure will be useful for respawns or
|
||||||
|
# recovery logic - the only case is some kind of strange bug
|
||||||
|
# in our transport layer itself? Going to keep this
|
||||||
|
# open ended for now.
|
||||||
|
|
||||||
|
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