-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Some p5.js functions do not make a call to _validateParameters (FES) #5649
Comments
The |
I believe that those examples should use the FES's Some more examples can be found by searching for "new Error" and "throw new", "console.warn" and "console.log" although "console.log" has a lot of false positives. This could probably be tagged with Good First Issue if it is deemed important to use the Friendly Error System. |
along the same lines, do we have any standard mechanism for warnings ? |
If I am not wrong, we have to add a new line which uses |
Ideally validating parameters go through If there are places where |
Being addressed in #7178 for 2.0 |
Topic
I was not sure whether this was a bug or intentional behaviour, so I filed it under discussion...
I have noticed that a large number of functions do not make a call to
_validateParameters()
, while others do. This leads to different types of error messages being produced when incorrect parameters are passed to each of them. For example:fill()
andstroke()
both do not make a call to_validateParameters()
. The error message is as follows:However, the functions which do have a call to
_validateParameters()
have a different ( friendlier) error message, as illustrated by the example ofconstrain()
:Is there a specific reason for this, or is this a bug?
The text was updated successfully, but these errors were encountered: