Skip to content

fix: replace raw console.log calls with FES warnings (fixes #8577)#8578

Open
MASTERsj01 wants to merge 1 commit intoprocessing:mainfrom
MASTERsj01:fix/replace-console-log-with-fes
Open

fix: replace raw console.log calls with FES warnings (fixes #8577)#8578
MASTERsj01 wants to merge 1 commit intoprocessing:mainfrom
MASTERsj01:fix/replace-console-log-with-fes

Conversation

@MASTERsj01
Copy link

Summary

Replaces 15 raw console.log() calls with p5._friendlyError() across 5 source files so that warning messages respect p5.disableFriendlyErrors = true.

Resolves #8577

Changes

File Changes
src/data/p5.TypedDict.js 6 console.logp5._friendlyError() + fixed typo "dont""don't"
src/data/local_storage.js 5 console.logp5._friendlyError() + fixed missing space in error message
src/dom/dom.js 2 console.logp5._friendlyError() + removed leftover debug console.log(id) in removeCue()
src/events/mouse.js 1 console.logp5._friendlyError()
src/image/p5.Image.js 1 console.logp5._friendlyError()

Notes

…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().
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.

Raw console.log calls should use Friendly Error System (FES)

1 participant