-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Missing Console Errors - File Not Found #468
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
Here's an example related to using an let txt;
function setup() {
createCanvas(400, 400);
text(txt,100,100);
} JS console error: Another: function setup() {
let v;
print(v);
} Console should display: |
Here's an example related to "file not found": let img;
function preload() {
img = loadImage('missingfile.png');
}
function setup() {} JS console error: |
Incorrect renderer: function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
rotateZ(100);
} Error should read: |
this has mostly been fixed, except for the file not found error. not sure why that's not getting to the console! |
Is #868 a duplicate of this issue? |
yep! they are the same issue. |
@shakeabi maybe! we're using the |
After a bit of debugging and research, I have determined that the One option, is to detect the failed to load image error provided by p5, and inject / emulate an error to match the network error. We might do that here Thoughts? |
Addition to @w3cj, currently we are using |
i think it would make sense to beautify the error, rather than remove it. if a user switches their sketch to not use friendly errors (for example, they switch to using the minified p5.js), it would be cool if some error still appeared. |
I think this one is working now, so it should be ok to close? Let me know if you've seen otherwise @shiffman ! |
Yes, the error does appear! The "Event" error referenced by @tayadev does also appear below the friendly one (or as @catarak mentioned if friendly errors are disabled). This I also see confuse students quite a bit b/c they assume something else is wrong with their sketch! Is this more of a p5 issue to throw a different error rather than a web editor one? I'll also mention that I often use a very large font size with the editor while teaching but would prefer to have a smaller console font size. Would it make sense for me to open a "feature request" issue about separate font size settings for code and console? I will search to see if this has been discussed before! |
This is technically a p5.js Editor issue but I'm not sure how to fix it. Basically the issue is that a Promise is being rejected and not being caught, but there's not a way to globally catch all rejected Promises. Somehow browsers are able to do this with some magic that I can't figure out. I recently made a bunch of updates to the way that Console catches errors and I could not figure out how to fix this one 😞
Definitely open a feature request about this! |
Thanks folks! I am thinking through what we should do with this issue: the error now appears (original issue is fixed!) but I agree it would be helpful suppress the additional error if possible, though the difficulty of the issue means it probably won't be prioritized for a bit. Is changing the bug title the right thing to do? Or close this one & open a new issue? If the error stopped showing again, I would want someone to let us know and either re-open or file a new issue (and not to think this one already covered what they wanted). |
Hi @kjhollen! I think b/c of all the twists and turns in this discussion it would be more clear for maintainers (when there is time to revisit) to close this issue and have a new one just about the specific suppression of the |
Starting over from #444, this github issue is to track error messages that show up in the native JS console, but not in the p5.js web editor console. To be clear, there are likely some error messages that should be hidden in the web editor console so this thread is also for discussion around these questions. This first issue contains a list of all the errors and subsequent comments will include specific code examples to trigger the missing error. Anyone should feel free to jump in and add to the comment thread and I'll keep the list below up to date!
loadJSON()
,loadImage()
, etc.Tagging @almchung as this relates to the Friendly Error System.
The text was updated successfully, but these errors were encountered: