Maps API for JavaScript Developer's Guide

H.lang.InvalidArgumentError

Class Summary

This class encapsulates an error to throw if an argument is invalid.

[ For full details, see the Class Details ]

Class Description

This class encapsulates an error to throw if an argument is invalid.

Example

H.Foo.prototype.bar = function(array, idx) {
  if(idx < 0) throw new H.lang.InvalidArgumentError(
  H.Foo.prototype.bar, 2, 'less then  0');
}
new H.Foo().bar([], -4711); // ==> 'Invalid Argument: H.Foo#bar "idx" (-4711) less then 0

Constructor Details

H.lang.InvalidArgumentError(opt_caller, opt_argNr, opt_message)

Parameters:
 
opt_caller:
{Function=} [optional]
 
The calling function
opt_argNr:
{?number=} [optional]
 
The index of the invalid argument (zero based)
opt_message:
{*=} [optional]
 
The text of the error message to output