Error.argumentOutOfRange Function
Creates an Error object that represents the Sys.ArgumentOutOfRangeException exception.
var err = Error.argumentOutOfRange(paramName, actualValue, message);
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.
Show: