tractor/tractor
Tyler Goodlet 0e8c60ee4a Better RAE `.pformat()`-ing for send-side MTEs
Send-side `MsgTypeError`s actually shouldn't have any "boxed" traceback
per say since they're raised in the transmitting actor's local task env
and we (normally) don't want the ascii decoration added around the
error's `._message: str`, that is not until the exc is `pack_error()`-ed
before transit. As such, the presentation of an embedded traceback (and
its ascii box) gets bypassed when only a `._message: str` is set (as we
now do for pld-spec failures in `_mk_msg_type_err()`).

Further this tweaks the `.pformat()` output to include the `._message`
part to look like `<RemoteActorError( <._message> ) ..` instead of
jamming it implicitly to the end of the embedded `.tb_str` (as was done
implicitly by `unpack_error()`) and also adds better handling for the
`with_type_header == False` case including forcing that case when we
detect that the currently handled exc is the RAE in `.pformat()`.
Toss in a lengthier doc-str explaining it all.

Surrounding/supporting changes,
- better `unpack_error()` message which just briefly reports the remote
  task's error type.
- add public `.message: str` prop.
- always set a `._extra_msgdata: dict` since some MTE props rely on it.
- handle `.boxed_type == None` for `.boxed_type_str`.
- maybe pack any detected input or `exc.message` in `pack_error()`.
- comment cruft cleanup in `_mk_msg_type_err()`.
2024-05-30 10:25:04 -04:00
..
_testing Start a new `._testing.fault_simulation` 2024-04-03 10:19:50 -04:00
devx Move runtime frame hiding into helper func 2024-05-22 14:56:54 -04:00
experimental Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
msg Add `Error.message: str` 2024-05-30 09:14:04 -04:00
trionics Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
__init__.py Expose `tractor.current_ipc_ctx()` at pkg level 2024-05-20 15:47:01 -04:00
_child.py Hide `._entry`/`._child` frames, tweak some more type annots 2024-04-14 17:49:18 -04:00
_clustering.py Passthrough runtime kwargs from `open_actor_cluster()` 2022-12-11 19:56:08 -05:00
_context.py Raise remote errors rxed during `Context` child-sync 2024-05-28 16:11:01 -04:00
_discovery.py More spaceless union type annots 2024-03-11 10:33:06 -04:00
_entry.py Call `.devx._debug.hide_runtime_frames()` by default 2024-05-22 15:16:29 -04:00
_exceptions.py Better RAE `.pformat()`-ing for send-side MTEs 2024-05-30 10:25:04 -04:00
_forkserver_override.py Re-license code base for distribution under AGPL 2021-12-14 23:33:27 -05:00
_ipc.py Drop `msg.types.Msg` for new replacement types 2024-05-28 09:55:16 -04:00
_mp_fixup_main.py Avoid importing mp for as long as possible 2022-02-17 11:55:26 -05:00
_multiaddr.py Fix doc string "its" typo.. 2023-11-06 15:44:21 -05:00
_portal.py Adjust `Portal` usage of `Context.pld_rx` 2024-05-20 16:07:57 -04:00
_root.py Call `.devx._debug.hide_runtime_frames()` by default 2024-05-22 15:16:29 -04:00
_rpc.py Fix missing newline in task-cancel log-message 2024-05-30 09:06:10 -04:00
_runtime.py Don't (noisly) log about runtime cancel RPC tasks 2024-05-28 16:03:36 -04:00
_shm.py Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
_spawn.py Add debug check-n-wait inside `._spawn.soft_kill()` 2024-05-22 15:21:01 -04:00
_state.py Add error suppress flag to `current_ipc_ctx()` 2024-05-20 16:12:51 -04:00
_streaming.py Allocate a `PldRx` per `Context`, new pld-spec API 2024-05-20 15:46:28 -04:00
_supervise.py Show runtime nursery frames on internal errors 2024-05-20 17:04:30 -04:00
log.py Woops, make `log.devx()` level less `.error()` 2024-05-22 14:56:18 -04:00
to_asyncio.py Provision for infected-`asyncio` debug mode support 2024-03-25 16:09:32 -04:00