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.argument Function

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

Syntax

var err = Error.argument(paramName, message);

Arguments

paramName

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

message

(Optional) An error message string. If message is null, a default message is used.

Return Value

An Error object that has name and paramName fields added to the Error type definition.

Remarks

The argument function lets you communicate that an exception has occurred when a function or method was invoked and when at least one of the passed arguments was invalid. The message parameter lets you optionally specify an error message. The paramName parameter enables you to specify the name of the parameter whose value was null and that caused the exception.