Skip to content

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
MASTERsj01:fix/console-log-to-fes-dev2
Open

fix: replace raw console.log calls with p5._friendlyError across multiple modules (addresses #8621)#8622
MASTERsj01 wants to merge 2 commits intoprocessing:dev-2.0from
MASTERsj01:fix/console-log-to-fes-dev2

Conversation

@MASTERsj01
Copy link

Summary

Replaces raw console.log() calls with p5._friendlyError() across 5 files so that warning messages respect p5.disableFriendlyErrors and can be translated via the i18n system. Also removes a leftover debug console.log(id) in removeCue().

Addresses #8621

Changes

File Change
src/data/local_storage.js 5 console.logp5._friendlyError in storeItem, getItem, removeItem
src/dom/p5.MediaElement.js Remove leftover debug console.log(id) in removeCue()
src/image/p5.Image.js 1 console.logp5._friendlyError in setFrame()
src/events/pointer.js 1 console.logp5._friendlyError in requestPointerLock()
src/dom/dom.js 1 console.logp5._friendlyError in createFileInput()

Notes

  • Only console.logp5._friendlyError replacements — no logic changes, no extra whitespace modifications
  • All locations confirmed on the dev-2.0 branch
  • 5 files changed: 20 insertions, 15 deletions

MASTERsj01 and others added 2 commits March 8, 2026 19:18
…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
@MASTERsj01
Copy link
Author

MASTERsj01 commented Mar 9, 2026

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! 🙏

@MASTERsj01
Copy link
Author

@ksen0 hii!
may you please tell what is the status of the pr as is there anything left or changes that i have to do ?

@ksen0
Copy link
Member

ksen0 commented Mar 11, 2026

It looks good @MASTERsj01 thanks! @perminder-17 @davepagurek if you think this makes sense to include in the next patch, we can merge it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants