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

highlight runtime errors #126

Merged

Conversation

saimeunt
Copy link
Contributor

@saimeunt saimeunt commented Mar 22, 2024

Fixes #99

@saimeunt saimeunt marked this pull request as ready for review March 22, 2024 14:15
@mazurroman
Copy link
Contributor

@saimeunt thank you for the contribution!

After looking at the app it looks like the error highlighting in Instructions as well as in CASM is working pretty well. However, I do not see the error being highlighted in Sierra, can you look into that?

Also, can you move the execution to the "error" statement? Currently the execution is at the beginning at "Step 1", but we want to move it to the error in case of an error.

Please reach out in case of any questions.

@saimeunt
Copy link
Contributor Author

@mazurroman I've moved the execution step to the error instruction on program run.

Regarding the SIERRA issue, I noticed the last execution trace is always pointing to the final return exiting the program and this instruction is not mapped to any SIERRA code 🤔 (no active index either).
Maybe the assumption "the last trace item is the runtime error" is untrue?
In this scenario I'm unsure how to proceed in order to pinpoint the SIERRA runtime error, I will try compiling and running the examples that panic with Cairo on my machine to get more info.

@mazurroman mazurroman requested a review from barabanovro March 27, 2024 17:58
Copy link
Contributor

@barabanovro barabanovro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @saimeunt, sorry for the confusion, we were wrong here. We should highlight the trace entry that is before the last one. In this case, it will always point to a Sierra statement. Please make these changes, and the PR will be ready to merge.

components/Tracer/index.tsx Outdated Show resolved Hide resolved
@saimeunt
Copy link
Contributor Author

@barabanovro thanks for the heads up, we should be getting there now 💪

@mazurroman
Copy link
Contributor

lgtm!

@mazurroman mazurroman self-requested a review March 28, 2024 14:04
@mazurroman mazurroman merged commit b671a45 into walnuthq:main Mar 28, 2024
2 checks passed
@saimeunt saimeunt deleted the feat-better-runtime-error-handling-99 branch March 29, 2024 10:36
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.

feat: Better runtime error handling
3 participants