You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Pull Request resolved: #213
This makes SerializedPyError match the exact formatting of python exceptions by using TracebackException to format it. It also ensures that it prepends any current members of the python stack to the Exceptions traceback before formatting. Normally exceptions are only reported after being completely unwound to the root of the python stack. But in most cases when we are capturing a Python exception it is because we are going to move it across the network. We might not have competely unwound the stack at the point we do the serialization, but this unwound stack is still potentially useful. So we also include these frames by adding them to the traceback object.
This also updates two places in PythonActor where exceptions would lose stack traces by going from PyErr -> anyhow::Error. By changing the result type to Result<_, SerialiablePyErr> we force it to capture the stack trace.
Reviewed By: suo, mariusae
Differential Revision: D76316820
fbshipit-source-id: 8093ea29af4061fa90d484d31088f40be4a8cc2a
0 commit comments