You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would improve the friendly errors on the web editor!
Most appropriate sub-area of p5.js?
Accessibility (Web Accessibility)
Build tools and processes
Color
Core/Environment/Rendering
Data
DOM
Events
Friendly error system
Image
IO (Input/Output)
Localization
Math
Unit Testing
Typography
Utilities
WebGL
Other (specify if possible)
Feature enhancement details:
TL;DR: I would like to get access to the private function report() to monkey patch it in order to make friendly errors look better in the web editor.
Why I would like to do this: I've been updating the way the p5.js Editor renders sketches for security reasons (processing/p5.js-web-editor#166). Recently, this issue came in (processing/p5.js-web-editor#1853) about the web editor not being friendly with using the debugger. I did some thinking about how to fix this and came up with a solution! But. It caused me to look at how friendly errors look in the web editor.
Current rendering engine, friendly errors
New rendering engine, friendly errors
As you can see, the friendly errors don't give useful information about the error location due to the magic that the p5.js editor does in order to render everything client-side. What are these seemingly meaningless URLs? They are Object URLs.
But! If I were able to monkey patch the report() function, I would be able to substitute the actual file names for the ObjectURLs in the messages.
Also, my reasoning for requesting for monkey patching versus a public API for updating the friendly errors is that this issue is editor specific—I'm not sure this issue would come up in any other places.
The text was updated successfully, but these errors were encountered:
How would this new feature help increase access to p5.js?
This would improve the friendly errors on the web editor!
Most appropriate sub-area of p5.js?
Feature enhancement details:
TL;DR: I would like to get access to the private function
report()
to monkey patch it in order to make friendly errors look better in the web editor.Why I would like to do this: I've been updating the way the p5.js Editor renders sketches for security reasons (processing/p5.js-web-editor#166). Recently, this issue came in (processing/p5.js-web-editor#1853) about the web editor not being friendly with using the debugger. I did some thinking about how to fix this and came up with a solution! But. It caused me to look at how friendly errors look in the web editor.
Current rendering engine, friendly errors
New rendering engine, friendly errors
As you can see, the friendly errors don't give useful information about the error location due to the magic that the p5.js editor does in order to render everything client-side. What are these seemingly meaningless URLs? They are Object URLs.
But! If I were able to monkey patch the
report()
function, I would be able to substitute the actual file names for the ObjectURLs in the messages.Also, my reasoning for requesting for monkey patching versus a public API for updating the friendly errors is that this issue is editor specific—I'm not sure this issue would come up in any other places.
The text was updated successfully, but these errors were encountered: