Store remote errors on each portal
parent
73e8aac36c
commit
d4da80c558
|
@ -57,8 +57,8 @@ class Portal:
|
||||||
# it is expected that ``result()`` will be awaited at some point
|
# it is expected that ``result()`` will be awaited at some point
|
||||||
# during the portal's lifetime
|
# during the portal's lifetime
|
||||||
self._result = None
|
self._result = None
|
||||||
|
self._exc = None
|
||||||
self._expect_result = None
|
self._expect_result = None
|
||||||
self._errored = False
|
|
||||||
|
|
||||||
async def aclose(self):
|
async def aclose(self):
|
||||||
log.debug(f"Closing {self}")
|
log.debug(f"Closing {self}")
|
||||||
|
@ -139,8 +139,9 @@ class Portal:
|
||||||
try:
|
try:
|
||||||
return msg['return']
|
return msg['return']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise RemoteActorError(
|
self._exc = RemoteActorError(
|
||||||
f"{self.channel.uid}\n" + msg['error'])
|
f"{self.channel.uid}\n" + msg['error'])
|
||||||
|
raise self._exc
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unknown msg response type: {first_msg}")
|
raise ValueError(f"Unknown msg response type: {first_msg}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue