Powered by Zoomin Software. For more details please contactZoomin

HERE Maps API for JavaScript - API Reference

Product category
Technology
Doc type
Version
Product lifecycle
This publication

HERE Maps API for JavaScript - API Reference: Class: OutOfRangeError

Table of Contents

Class: OutOfRangeError

H.lang.OutOfRangeError

new H.lang.OutOfRangeError (opt_caller, opt_val, opt_range)

This class encapsulates information about an error to throw if the value supplied by the caller is out of range.

Example
H.Foo.prototype.bar = function(array, idx) {
  if (idx < 0) {
    throw new H.lang.OutOfRangeError(
      H.Foo.prototype.bar, 2, [0, array.length - 1]);
  }
}
new H.Foo().bar(-4, [0, 1]); // ==> 'OutOfRange: H.Foo#bar (-4 out of [0...1])'
Was this article helpful?
TitleResults for “How to create a CRG?”Also Available inAlert