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:


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

Is there a specific reason for this, or is this a bug?
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?