Error.argumentOutOfRange Function

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

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

Arguments

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

Return Value

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

Remarks

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.

See Also

Reference

Error Type Extensions

Concepts

Debugging and Tracing Ajax Applications Overview

Other Resources

Language Reference