fix: replace raw console.log calls with p5._friendlyError across multiple modules (addresses #8621)#8622
Open
MASTERsj01 wants to merge 2 commits intoprocessing:dev-2.0from
Open
Conversation
…iple modules Replace raw console.log() calls with p5._friendlyError() so that warning messages respect p5.disableFriendlyErrors and can be translated via the i18n system. Changes: - src/data/local_storage.js: 5 console.log → p5._friendlyError (storeItem, getItem, removeItem validation warnings) - src/dom/p5.MediaElement.js: remove leftover debug console.log(id) in removeCue() - src/image/p5.Image.js: 1 console.log → p5._friendlyError (setFrame invalid frame index warning) - src/events/pointer.js: 1 console.log → p5._friendlyError (requestPointerLock browser capability warning) - src/dom/dom.js: 1 console.log → p5._friendlyError (createFileInput File APIs browser capability warning) Addresses processing#8608, processing#8609, processing#8610, processing#8611
Author
|
Hey @ksen0, whenever you get a chance, could you take a look at this PR? All checks are passing and there are no conflicts. Thank you! 🙏 |
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 raw
console.log()calls withp5._friendlyError()across 5 files so that warning messages respectp5.disableFriendlyErrorsand can be translated via the i18n system. Also removes a leftover debugconsole.log(id)in removeCue().Addresses #8621
Changes
console.log→p5._friendlyErrorin storeItem, getItem, removeItemconsole.log(id)in removeCue()console.log→p5._friendlyErrorin setFrame()console.log→p5._friendlyErrorin requestPointerLock()console.log→p5._friendlyErrorin createFileInput()Notes
console.log→p5._friendlyErrorreplacements — no logic changes, no extra whitespace modificationsdev-2.0branch