Skip to content

[13.0] [IMP] Statechart interpreter: print execution traceback#38

Open
ThomasBinsfeld wants to merge 3 commits into
13.0from
13.0-imp_interpreter_execute_once_traceback_tbi
Open

[13.0] [IMP] Statechart interpreter: print execution traceback#38
ThomasBinsfeld wants to merge 3 commits into
13.0from
13.0-imp_interpreter_execute_once_traceback_tbi

Conversation

@ThomasBinsfeld
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants