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
parent
6e54abc56d
commit
1db5d4def2
|
@ -410,7 +410,13 @@ class Error(
|
||||||
src_type_str: str
|
src_type_str: str
|
||||||
boxed_type_str: str
|
boxed_type_str: str
|
||||||
relay_path: list[tuple[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?
|
# TODO: only optionally include sub-type specfic fields?
|
||||||
# -[ ] use UNSET or don't include them via `omit_defaults` (see
|
# -[ ] use UNSET or don't include them via `omit_defaults` (see
|
||||||
|
|
Loading…
Reference in New Issue