Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.








Error.argumentType Function

Creates an Error Object object that represents the Sys.ArgumentTypeException exception.


var err = Error.argumentType(paramName, actualType, expectedType, message);



(Optional) The name of the parameter that caused the exception. The value can be null.


(Optional) The actual value of the parameter. The value can be null.


(Optional) The expected fully qualified type of the parameter value.


(Optional) An error message string. The value can be null.

Return Value

An Error Object object that has name, paramName, actualType, and expectedType fields added to the Error type definition.


The argumentType function lets you communicate that an exception has occurred when a function or method was invoked and when a parameter is not an allowed type.