Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imprecise console.log error message to a misspelling #4399

Closed
10 tasks
eharkins100 opened this issue Mar 21, 2020 · 5 comments
Closed
10 tasks

Imprecise console.log error message to a misspelling #4399

eharkins100 opened this issue Mar 21, 2020 · 5 comments
Labels

Comments

@eharkins100
Copy link

<

Most appropriate sub-area of p5.js?

  • Color
  • Core/Environment/Rendering
  • Data
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • [X ] Other (imprecise console.log error message)

Details about the bug: the console.log said that ellipse was expecting a different argument, however my mistake was misspelling the word "constructor" as cconstructor; to be sure, i misspelled it in a different way and the console printed out the same error message; i thought if misspellings of other commands like strokeWeight can be returned as errors, the same could be done with "constructor"

  • p5.js version:
  • Web browser and version: <!-- Google Chrome | 80.0.3987.149 (Official Build) (64-bit)- - | --
  • Operating System: <OS | macOS Version 10.15.2 (Build 19C57)-- | --
  • Steps to reproduce this:

CONSOLE:

p5.js says: ellipse() was expecting Number for parameter #1 (zero-based index), received an empty variable instead. If not intentional, this is often a problem with scope: [https://p5js.org/examples/data-variable-scope.html] at about:srcdoc:84:5. [http://p5js.org/reference/#p5/ellipse]

@welcome
Copy link

welcome bot commented Mar 21, 2020

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@limzykenneth
Copy link
Member

Hi @eharkins100 do you have a sample code demonstrating the issue? Thanks.

@eharkins100
Copy link
Author

eharkins100 commented Mar 23, 2020 via email

@limzykenneth
Copy link
Member

constructor in this case is a Javascript keyword, unlike something like strokeWeight which is defined in the library itself, we have no way of checking whether constructor is correctly spelled or not.

@eharkins100
Copy link
Author

eharkins100 commented Mar 23, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants