tractor
tractor copied to clipboard
Embedded `RemoteActorError`s and other exceptions
Relates heavily to #5.
After doing a lot of involved messaging / runtime reworking in #261 I've realized it would sure be a lot more friendly to support embedded / nested RemoteActor
errors.
Here's a simple example:
root
spawns child
, child
starts task in root
and that task errors making the error flow look like:
root
--RemoteActorError[Exception]
--> child
root
<--RemoteActorError[RemoteActorError[Exception]]]
-- child
The problem is that currently there's no way to dig out the original Exception
details from the nested rme.
How could we offer this such that, for example, a task can introspect and understand more complex error flows?
Questions:
- Is this over the top and we should try to keep things flat instead of nested (python zen stuff)?
- where should nesting end? In theory you could have a ping pong nesting of a single error under the right conditions in which case does something like the messaging equivalent of a
RecursionError
make sense? - what actual source exception details / metadata should we be serializing (would love to keep it super simple and with cross-lang support in mind), which is basically the main question #5?
Resources:
-
raise from
syntax is one built-in way we can chain exception data (see this SO) but how would we get the nested form of this? A custom tb serializer?