Skip to content

fix: replace console.warn with p5._friendlyError in p5.Vector mult()/div() (fixes #8589)#8590

Open
MASTERsj01 wants to merge 1 commit intoprocessing:mainfrom
MASTERsj01:fix/vector-console-to-fes
Open

fix: replace console.warn with p5._friendlyError in p5.Vector mult()/div() (fixes #8589)#8590
MASTERsj01 wants to merge 1 commit intoprocessing:mainfrom
MASTERsj01:fix/vector-console-to-fes

Conversation

@MASTERsj01
Copy link

Summary

Replaces all 9 console.warn calls in p5.Vector.mult() and p5.Vector.div() with p5._friendlyError().

Resolves #8589

Changes

Method Warnings What
mult() 3 Invalid vector components, array elements, number arguments
div() 6 Divide by zero (3) + invalid components/elements/arguments (3)

All messages now respect p5.disableFriendlyErrors. Zero console.warn remaining in p5.Vector.js.

Notes

  • All existing tests pass (1913 passing)
  • 1 file changed: 50 insertions, 50 deletions

…div()

- Replace 9 console.warn calls in mult() and div() with p5._friendlyError()
- Covers: invalid vector components, invalid array elements,
  invalid number arguments, and divide-by-zero warnings
- Messages now respect p5.disableFriendlyErrors setting
- Zero console.warn remaining in p5.Vector.js
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.

p5.Vector: replace console.warn with Friendly Error System (FES) in mult() and div()

1 participant