Lul, don't overwrite 'tb_str' with src actor's..
This is what was breaking the nested debugger test (where it was failing on the traceback content matching) and it makes sense.. XD => We always want to use the locally boxed `RemoteActorError`'s traceback content NOT overwrite it with that from the src actor.. Also gets rid of setting the `'relay_uid'` since it's pulled from the final element in the `'relay_path'` anyway.mv_to_new_trio_py3.11
parent
290b0a86b1
commit
8e66f45e23
|
@ -111,7 +111,6 @@ class RemoteActorError(Exception):
|
||||||
reprol_fields: list[str] = [
|
reprol_fields: list[str] = [
|
||||||
'src_uid',
|
'src_uid',
|
||||||
'relay_path',
|
'relay_path',
|
||||||
# 'relay_uid',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@ -487,14 +486,11 @@ def pack_error(
|
||||||
else:
|
else:
|
||||||
tb_str = traceback.format_exc()
|
tb_str = traceback.format_exc()
|
||||||
|
|
||||||
our_uid: tuple = current_actor().uid
|
error_msg: dict[ # for IPC
|
||||||
error_msg: dict[
|
|
||||||
str,
|
str,
|
||||||
str | tuple[str, str]
|
str | tuple[str, str]
|
||||||
] = {
|
] = {}
|
||||||
'tb_str': tb_str,
|
our_uid: tuple = current_actor().uid
|
||||||
'relay_uid': our_uid,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
isinstance(exc, RemoteActorError)
|
isinstance(exc, RemoteActorError)
|
||||||
|
@ -535,6 +531,11 @@ def pack_error(
|
||||||
[],
|
[],
|
||||||
).append(our_uid)
|
).append(our_uid)
|
||||||
|
|
||||||
|
# XXX NOTE: always ensure the traceback-str is from the
|
||||||
|
# locally raised error (**not** the prior relay's boxed
|
||||||
|
# content's `.msgdata`).
|
||||||
|
error_msg['tb_str'] = tb_str
|
||||||
|
|
||||||
pkt: dict = {'error': error_msg}
|
pkt: dict = {'error': error_msg}
|
||||||
if cid:
|
if cid:
|
||||||
pkt['cid'] = cid
|
pkt['cid'] = cid
|
||||||
|
|
Loading…
Reference in New Issue