fix: replace raw console.log calls with FES warnings (fixes #8577)#8578
Open
MASTERsj01 wants to merge 1 commit intoprocessing:mainfrom
Open
fix: replace raw console.log calls with FES warnings (fixes #8577)#8578MASTERsj01 wants to merge 1 commit intoprocessing:mainfrom
MASTERsj01 wants to merge 1 commit intoprocessing:mainfrom
Conversation
…ents, and Image modules Replace 15 raw console.log() calls with p5._friendlyError() across 5 source files so that warning messages respect the p5.disableFriendlyErrors flag. Changes: - src/data/p5.TypedDict.js: 6 console.log -> p5._friendlyError in get(), set(), create(), add(), mult(), div(). Also fixed typo 'dont' -> 'don''t'. - src/data/local_storage.js: 5 console.log -> p5._friendlyError in storeItem(), getItem(), removeItem(). Also fixed missing space in error message. - src/dom/dom.js: 2 console.log -> p5._friendlyError in createFileInput() and drop(). Removed leftover debug console.log(id) in removeCue(). - src/events/mouse.js: 1 console.log -> p5._friendlyError in requestPointerLock(). - src/image/p5.Image.js: 1 console.log -> p5._friendlyError in setFrame().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces 15 raw
console.log()calls withp5._friendlyError()across 5 source files so that warning messages respectp5.disableFriendlyErrors = true.Resolves #8577
Changes
console.log→p5._friendlyError()+ fixed typo"dont"→"don't"console.log→p5._friendlyError()+ fixed missing space in error messageconsole.log→p5._friendlyError()+ removed leftover debugconsole.log(id)in removeCue()console.log→p5._friendlyError()console.log→p5._friendlyError()Notes
console.loginp5.TypedDict.print()is intentional (user-facing API) and was not changed.