Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show detailed info about compiled code blocks #727

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

BryceStevenWilley
Copy link
Contributor

Currently, when a code block fails at runtime, the only piece of information in the stack trace is <code block>, with no indication where the code block was located.

This PR adds the id_debug function to Questions, and uses it to get info about the file and line number of the code block. It puts this info in compiled validation code and code blocks, so if they fail at runtime, the error contains a relevant file and line number.

An example of what the stack trace looks like now:

Screenshot from 2024-01-03 14-52-20

Currently, when a code block fails at runtime, the only piece of information
in the stack trace is `<code block>`, with no indication where the code block
was located.

This PR adds the `id_debug` function to Questions, and uses it to get info
about the file and line number of the code block. It puts this info in
compiled `validation code` and `code` blocks, so if they fail at runtime,
the error contains a relevant file and line number.
@jhpyle jhpyle merged commit 25b16fc into jhpyle:master Jan 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants