p5canvas icon indicating copy to clipboard operation
p5canvas copied to clipboard

Getting P5.JS' friendly error system into the console

Open ccoenen opened this issue 3 years ago • 5 comments

Recent versions of P5.js have excellent error messages. We should look into getting them into the console.

ccoenen avatar Jan 19 '22 12:01 ccoenen

I just learned that this is called "Friendly Error System": https://github.com/processing/p5.js/blob/main/contributor_docs/friendly_error_system.md

ccoenen avatar Oct 10 '22 14:10 ccoenen

I fiddled around with _fesLogger for a good long while, until I realized that minified p5 just strips the debug logging stuff. I now included the full, unminified p5.js, and did no other modifications to p5canvas. This is the result:

grafik

ccoenen avatar Oct 10 '22 15:10 ccoenen

I will now look into getting the filenames cleaner. Would you be fine with shipping full p5.js instead of minified @pixelkind?

ccoenen avatar Oct 10 '22 15:10 ccoenen

whoopsie! it noticed! grafik

ccoenen avatar Oct 10 '22 16:10 ccoenen

getting somewhere :-)

grafik

ccoenen avatar Oct 10 '22 16:10 ccoenen