forked from goodboy/tractor
1
0
Fork 0

Add `Error.message: str`

Allows passing a custom error msg other then the traceback-str over the
wire. Make `.tb_str` optional (in the blank `''` sense) since it's
treated that way thus far in `._exceptions.pack_error()`.
runtime_to_msgspec
Tyler Goodlet 2024-05-30 09:14:04 -04:00
parent 6e54abc56d
commit 1db5d4def2
1 changed files with 7 additions and 1 deletions

View File

@ -410,7 +410,13 @@ class Error(
src_type_str: str
boxed_type_str: str
relay_path: list[tuple[str, str]]
tb_str: str
# normally either both are provided or just
# a message for certain special cases where
# we pack a message for a locally raised
# mte or ctxc.
message: str|None = None
tb_str: str = ''
# TODO: only optionally include sub-type specfic fields?
# -[ ] use UNSET or don't include them via `omit_defaults` (see