Error.parameterCount Function
Creates an Error object that represents the Sys.ParameterCountException exception.
var err = Error.parameterCount(message);
Arguments
- message
(Optional) An error message string. The value can be null. If message is null, a default message is used.
Return Value
An Error object.
Remarks
The parameterCount function lets you communicate that an exception has occurred when an invalid number of arguments have been passed to a function. The message argument enables you to specify additional error information.
Example
The following example shows how to create, throw, and catch a Sys.ParameterCountException error by using the parameterCount function.
See Also
Concepts
Debugging and Tracing AJAX Applications Overview