Error.parameterCount Function

Creates an Error object that represents the Sys.ParameterCountException exception.

var err = Error.parameterCount(message);


  • 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.


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.


The following example shows how to create, throw, and catch a Sys.ParameterCountException error by using the parameterCount function.

See Also


Debugging and Tracing AJAX Applications Overview


Error Type Extensions

Other Resources

Language Reference