Assign `RemoteActorError` boxed error type for context cancelleds

proper_breakpoint_hooking
Tyler Goodlet 2023-04-07 16:08:07 -04:00
parent 29a1171142
commit 60bff71cd3
1 changed files with 5 additions and 3 deletions

View File

@ -55,9 +55,11 @@ class RemoteActorError(Exception):
class InternalActorError(RemoteActorError): class InternalActorError(RemoteActorError):
"""Remote internal ``tractor`` error indicating '''
Remote internal ``tractor`` error indicating
failure of some primitive or machinery. failure of some primitive or machinery.
"""
'''
class TransportClosed(trio.ClosedResourceError): class TransportClosed(trio.ClosedResourceError):
@ -136,7 +138,7 @@ def unpack_error(
if type_name == 'ContextCancelled': if type_name == 'ContextCancelled':
err_type = ContextCancelled err_type = ContextCancelled
suberror_type = trio.Cancelled suberror_type = RemoteActorError
else: # try to lookup a suitable local error type else: # try to lookup a suitable local error type
for ns in [ for ns in [