From d24a9e158f42369e3f95991e503e4cbb74d100fa Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 7 Oct 2023 18:51:03 -0400 Subject: [PATCH] Msg-ified `ContextCancelled`s sub-error type should always be just, its type.. --- tractor/_exceptions.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tractor/_exceptions.py b/tractor/_exceptions.py index 6da2e65..9de27bd 100644 --- a/tractor/_exceptions.py +++ b/tractor/_exceptions.py @@ -39,8 +39,11 @@ class ActorFailure(Exception): class RemoteActorError(Exception): + ''' + Remote actor exception bundled locally + + ''' # TODO: local recontruction of remote exception deats - "Remote actor exception bundled locally" def __init__( self, message: str, @@ -149,13 +152,13 @@ def unpack_error( error = msg['error'] tb_str = error.get('tb_str', '') - message = f"{chan.uid}\n" + tb_str + message = f'{chan.uid}\n' + tb_str type_name = error['type_str'] suberror_type: Type[BaseException] = Exception if type_name == 'ContextCancelled': err_type = ContextCancelled - suberror_type = RemoteActorError + suberror_type = err_type else: # try to lookup a suitable local error type for ns in [