Skip to content

Add more friendly error help for global APIs used at top-level code #1247

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

Closed
toolness opened this issue Feb 11, 2016 · 0 comments · Fixed by #1256
Closed

Add more friendly error help for global APIs used at top-level code #1247

toolness opened this issue Feb 11, 2016 · 0 comments · Fixed by #1256

Comments

@toolness
Copy link
Member

In #1130 we added some logic that attempts to notice when people use p5's global APIs in top-level code, but it looks like there are some ways to improve it:

Another possibility for the first two is to actually embed an entire (auto-generated) list of every single public p5 symbol in the debug builds of p5.js, and match any pre-load exceptions thrown to it. This might have the downside of matching on too many exceptions, but it's also much more likely to help beginners... Hmm.

@toolness toolness changed the title Add more help for global APIs used at top-level code Add more friendly error help for global APIs used at top-level code Feb 11, 2016
toolness added a commit to toolness/p5.js that referenced this issue Feb 13, 2016
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 a pull request may close this issue.

1 participant