Use `'<unknown>'` for unresolvable `.boxed_type_str`
Add a teensie unit test to match. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-codemulticast_revertable_streams
parent
80597b80bf
commit
5968a3c773
|
|
@ -165,6 +165,16 @@ class TestRegErrTypesPlumbing:
|
||||||
is tractor.ContextCancelled
|
is tractor.ContextCancelled
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_boxed_type_str_without_ipc_msg(self):
|
||||||
|
'''
|
||||||
|
When a `RemoteActorError` is constructed
|
||||||
|
without an IPC msg (and no resolvable type),
|
||||||
|
`.boxed_type_str` should return `'<unknown>'`.
|
||||||
|
|
||||||
|
'''
|
||||||
|
rae = RemoteActorError('test')
|
||||||
|
assert rae.boxed_type_str == '<unknown>'
|
||||||
|
|
||||||
|
|
||||||
# -- IPC-level integration tests --
|
# -- IPC-level integration tests --
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -491,7 +491,7 @@ class RemoteActorError(Exception):
|
||||||
if self._ipc_msg:
|
if self._ipc_msg:
|
||||||
return self._ipc_msg.boxed_type_str
|
return self._ipc_msg.boxed_type_str
|
||||||
|
|
||||||
return ''
|
return '<unknown>'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def boxed_type(self) -> Type[BaseException]:
|
def boxed_type(self) -> Type[BaseException]:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue