Skip to content

Some p5.js functions do not make a call to _validateParameters (FES)Β #5649

@reejuBhattacharya

Description

@reejuBhattacharya

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() and stroke() both do not make a call to _validateParameters(). The error message is as follows:

image

image

However, the functions which do have a call to _validateParameters() have a different ( friendlier) error message, as illustrated by the example of constrain():

image

Is there a specific reason for this, or is this a bug?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions