Export (0) Print
Expand All

Error.argumentType Function

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

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

paramName

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

actualType

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

expectedType

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

message

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

An Error 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.

Community Additions

ADD
Show:
© 2014 Microsoft