I am currently raising a custom exception within Ray remote workers. The reason for wanting to use a custom exception is that I would like to relay back to the user fine-grained details about the reason for the error.
I can catch the my custom raised exception within
main.py when trying on
ray.get but I’m unable to access any of the member variables from my exception. I noticed that Ray creates an inherited class based on
RayTaskError within the function
as_instanceof_cause but this appears not to initialise my base exception class correctly.
So I was wondering whether I am missing something here or is it not possible to obtain the information from my custom exception when I worker fails. I noticed that there is the
traceback_str variable in
RayTaskError which I could use but I was after a cleaner way of getting precise details back when a worker fails.