Skip to content

Conversation

@ThomasBinsfeld
Copy link
Member

In some cases, statechart hide the root traceback of an error, making it very difficult to debug.

The raise statement raise _root_cause(e).with_traceback(sys.exc_info()[2]) may be improved but raise _root_cause(e) is not a good solution.

While waiting for a better solution that would allow to raise an error with the complete traceback, let's print additionnal information with traceback.print_exc(). We're now sure to have everything needed for debug.

In some cases, statechart hide the source traceback of an error.
Print the execution traceback to be sure to have all details in log.
@sbidoul
Copy link
Member

sbidoul commented Dec 15, 2023

@ThomasBinsfeld @sbejaoui in 14 and 16 it now does raise _root_cause()... from e. This should preserve the original exception. What do you think?

raise _root_cause(e).with_traceback(sys.exc_info()[2]) from e

@sbidoul
Copy link
Member

sbidoul commented Aug 13, 2025

Is this still relevant in 16/18 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants