-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
friendly error system preferences item #417
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
Comments
I guess one point for debate -- |
I think it would make sense to, by default, add the non-minified p5.js to a project and include the friendly errors in preferences. Maybe the preference could be removed or unable to be changed if the non-minified version of p5 isn't included in the project? |
@lmccart for this to work as expected, do |
no, just p5.js. |
i'm having trouble disabling the friendly errors using |
using version 0.6.0, both of these are working for me: p5.disableFriendlyErrors = true;
function setup() {
ellipse(3, 3);
} function setup() {
p5.disableFriendlyErrors = true;
ellipse(3, 3);
} |
Is this feature already implemented in the web editor? |
it is not! there's not a design for it but it can look similar to the "autosave" option. it should be under the tab "general settings". |
I really can't imagine why we're not using the friendly error mechanism by default in the online editor (including p5.js rather than p5.min.js). This seems the place where it would be most useful of all (perhaps with an option to disable for the few advanced users still using the editor who happen to need higher performance)? Multiple times per week I see sketches like below fail silently for new users and it is totally confusing for them:
|
How about just defaulting to the non-minified p5.js for now? I think it is this line that would need to be changed |
@dhowe I think one concern was that this significantly slows things down performance-wise and might give a slow first impression of the library. but I may be misremembering. |
when new students don't even get basic error messages on mistakes, it is sort of beside the point whether performance is good or not, as they will quickly give up or move on to another tool this seems absolutely critical from my (teaching) perspective... @catarak ? |
i hear you @dhowe. i agree this should be added soon! update: got a chance to work on this! needs a little more testing and handling of edge cases. |
… tag is missing from index.html, for #417
… tag is missing from index.html, for #417
i'm going through a backlog of pull requests and just reached my initial version to add this as a preference. i'm thinking that it's too confusing to add this as a preference, as it's unclear what it should do. for example, is this a per-sketch preference or per-account? maybe, for all projects, non-minified p5.js should be included by default, and advanced users can change to p5.min.js if they need to. this could also fit into a #4 library management system, in which a user could, with a GUI, switch from the non-minified to the minified for a project. |
This is what I was thinking -- ideally one could easily switch to minified via the UI (rather than hand-editing the index.html) |
agreed! the library management feature has unfortunately been pushed off for a while, but i actually don't think it's a ton of work. would be a great self-contained project within the editor for someone to work on! |
@catarak makes sense to me! |
…update default p5.js version to latest
…update default p5.js version to latest (#1084)
@almchung has implemented the "friendly error system" in the p5.js, that is, functionality that will (optionally) check the parameters passed into p5 functions when they're called and send helpful messages to console. we're about to merge it this week. this feature can be toggled on and off by setting a boolean variable (
p5.disableFriendlyErrors = true/false;
) in the sketch. is it possible to add this as a preferences item that can be toggled from there, too?if it sounds ok, I can work on implementing this.
The text was updated successfully, but these errors were encountered: