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
I believe there are several issues related to friendly error messages like #717 and #657, however, I couldn't find the right place for this. Someone feel free to move and close if a new issue isn't appropriate.
I was teaching a short workshop yesterday for some students who knew Processing. I ran the following code:
function setup() {
size(200, 200);
}
function draw() {
background(0);
}
And showed them the message: Uncaught size() not implemented, see createCanvas(). No one was able to guess what this meant, I propose changing it to something a bit more explicit? I'm terrible at writing these, but something along the lines of size() is not a valid p5 function, to create a drawing window please use createCanvas() instead.
The text was updated successfully, but these errors were encountered:
I think that would be very helpful. Some more documentation on how to use the friendly error handling would be great—it's a fantastic tool, but I also am not 100% sure how to work with it. @crecord or @crhallberg, is there a place where people like myself could learn more about how to use it?
Looking into this a little bit—is there any reason why we don't just make size() function call the createCanvas() function? We could still throw a depreciated method note in there, but it seems pretty obvious what the user is intending...
Apologies if this was already discussed somewhere earlier.
I believe there are several issues related to friendly error messages like #717 and #657, however, I couldn't find the right place for this. Someone feel free to move and close if a new issue isn't appropriate.
I was teaching a short workshop yesterday for some students who knew Processing. I ran the following code:
And showed them the message:
Uncaught size() not implemented, see createCanvas()
. No one was able to guess what this meant, I propose changing it to something a bit more explicit? I'm terrible at writing these, but something along the lines ofsize() is not a valid p5 function, to create a drawing window please use createCanvas() instead.
The text was updated successfully, but these errors were encountered: