p5.js
p5.js copied to clipboard
Replaced all console.error with p5._friendlyError
Resolves #6630
Changes:
All the console.error in the codebase were replaced with p5._friendlyError. Since this is my first contribution kindly accept this.Screenshots of the change:
PR Checklist
- [x]
npm run lintpasses - [ ] Inline documentation is included / updated
- [ ] Unit tests are included / updated
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page!
Since this is my first contribution i didnt exactly understand what is inline documentation and unit tests. Please accept the pull request as i have put a lot of time in this contribution
@all-contributors please add @samrudh3125 for THING(S)
@samrudh3125
I couldn't determine any contributions to add, did you specify any contributions? Please make sure to use valid contribution names.
all-contributors please add @YOUR-USERNAME for p5.js
@all-contributors please add @samrudh3125 for processing/p5.js
@samrudh3125
I couldn't determine any contributions to add, did you specify any contributions? Please make sure to use valid contribution names.
@all-contributors please add @samrudh3125 for a11y
Hey @samrudh3125, thanks a lot for your work on this. However, that's not exactly how it works. For example, when I use console.err(e), it means I’m unsure of what’s happening or what kind of error might be occurring, and we get a line from the p5.js library. Friendly errors, on the other hand, are designed to be more helpful to the user. They point out the specific line in your code where the issue happened and even suggest possible solutions. These errors are not only formatted clearly but also provide guidance. You can see an example below where both an error message and a friendly error message are shown.
So, closing this PR, but thanks a lot on your work.