diff --git a/tests/test_advanced_faults.py b/tests/test_advanced_faults.py index 2103f627..009e25b0 100644 --- a/tests/test_advanced_faults.py +++ b/tests/test_advanced_faults.py @@ -146,9 +146,6 @@ def test_ipc_channel_break_during_stream( # a user sending ctl-c by raising a KBI. if pre_aclose_msgstream: expect_final_exc = KeyboardInterrupt - if tpt_proto == 'uds': - expect_final_exc = TransportClosed - expect_final_cause = trio.BrokenResourceError # XXX OLD XXX # if child calls `MsgStream.aclose()` then expect EoC. @@ -169,10 +166,6 @@ def test_ipc_channel_break_during_stream( if pre_aclose_msgstream: expect_final_exc = KeyboardInterrupt - if tpt_proto == 'uds': - expect_final_exc = TransportClosed - expect_final_cause = trio.BrokenResourceError - # NOTE when the parent IPC side dies (even if the child does as well # but the child fails BEFORE the parent) we always expect the # IPC layer to raise a closed-resource, NEVER do we expect diff --git a/tractor/_exceptions.py b/tractor/_exceptions.py index 418accc3..15b785fa 100644 --- a/tractor/_exceptions.py +++ b/tractor/_exceptions.py @@ -982,6 +982,7 @@ class TransportClosed(Exception): ''' __tracebackhide__: bool = hide_tb message: str = message or self.message + # when a cause is set, slap it onto the log emission. if cause := self.src_exc: cause_tb_str: str = ''.join( @@ -989,7 +990,7 @@ class TransportClosed(Exception): ) message += ( f'{cause_tb_str}\n' # tb - f' {cause}\n' # exc repr + f'{cause!r}\n' # exc repr ) getattr( diff --git a/tractor/_rpc.py b/tractor/_rpc.py index cae92bad..9bd1c475 100644 --- a/tractor/_rpc.py +++ b/tractor/_rpc.py @@ -1313,12 +1313,10 @@ async def process_messages( f'peer IPC channel closed abruptly?\n' f'\n' f'<=x[\n' - f' {chan}\n' - f' |_{chan.raddr}\n\n' + f'{chan}\n' ) + tc.message - ) # transport **WAS** disconnected