diff --git a/tractor/devx/debug/_trace.py b/tractor/devx/debug/_trace.py index 70d39325..a7a1ce43 100644 --- a/tractor/devx/debug/_trace.py +++ b/tractor/devx/debug/_trace.py @@ -58,6 +58,7 @@ from tractor._context import Context from tractor import _state from tractor._exceptions import ( NoRuntime, + InternalError, ) from tractor._state import ( current_actor, @@ -79,6 +80,9 @@ from ._sigint import ( sigint_shield as sigint_shield, _ctlc_ignore_header as _ctlc_ignore_header ) +from ..pformat import ( + ppfmt, +) if TYPE_CHECKING: from trio.lowlevel import Task @@ -1153,9 +1157,10 @@ def pause_from_sync( 'use_greenback', False, ): - raise RuntimeError( - '`greenback` was never initialized in this actor!?\n\n' - f'{_state._runtime_vars}\n' + raise InternalError( + f'`greenback` was never initialized in this actor?\n' + f'\n' + f'{ppfmt(_state._runtime_vars)}\n' ) from rte raise