Export (0) Print
Expand All

Error.argumentOutOfRange Function

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

var err = Error.argumentOutOfRange(paramName, actualValue, message);

paramName

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

actualValue

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

message

(Optional) An error message string. The value can be null. If message is null, a default message is used.

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

The argumentOutOfRange function lets you communicate that an exception has occurred when a function or method was invoked and when an argument value is outside an acceptable range. Use the argumentOutOfRange function to create an Error object that represents a Sys.ArgumentOutOfRangeException exception that can include additional information that is useful for processing the exception.

Community Additions

Show:
© 2014 Microsoft