-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
1.10.0
Web browser and version
128.0.6613.119 (Official Build) (arm64)
Operating system
MacOSX Sonoma 14.5
Steps to reproduce this
Steps:
- Test simple shape function like
circle(100,100, )
- intentionally not added diameter parameter - Run sketch - open console
- FES message shows wrong reference link (still links to archive p5js website not the new one)
NOTE: This error shows up in locally run sketch and in the p5.js web editor
Old links for reference was http://p5js.org/reference/#/p5/circle and now with the revamped website it should be https://p5js.org/reference/p5/circle/
Solution
Requires a small edit in the FES core file src/core/friendly_errors/fes_core.js
and possibly src/core/friendly_errors/sketch_reader.js
Reference links here
p5.js/src/core/friendly_errors/fes_core.js
Line 148 in ada3c05
msgWithReference = `${message} (http://p5js.org/reference/#/${referenceSection}.${funcName})` : |
let url = `https://p5js.org/reference/#/p5/${variableArray[i]}`; |
Snippet:
I believe this is the change needed - but I would need some guidance to share the PR for this.
// line 147
//Whenever func having p5.[Class] is encountered, we need to have the error link as mentioned below else different link
funcName.startsWith('p5.') ?
msgWithReference = `${message} (https://p5js.org/reference/${referenceSection}.${funcName})` :
msgWithReference = `${message} (https://p5js.org/reference/${referenceSection}/${funcName})`;
mvicky2592