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

Anonymous procedures defined outside of the main code tab give unhelpful code locations #2240

Open
LaCuneta opened this issue Apr 11, 2024 · 0 comments

Comments

@LaCuneta
Copy link
Contributor

I discovered this while working on #2239. If you add a global to a model and set its value to an anonymous procedure inside a button, then a runtime error occurring in that procedure gives unhelpful information about where it occured:

  • If it's a command it gives a small stack trace in the error window, but that trace doesn't indicate the code lives in a button.
  • If it's a reporter it gives the same short error message, but jumps to the code tab and highlights the incorrect code, likely the offsets from where the reporter definition lives in the button.

I did not test other possible source locations, such as includes files or (shudder) plot commands.

Related is #427, which I think would make implementing and testing this much simpler and should be prioritized over these limited edge cases.

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

No branches or pull requests

1 participant