1 | // ArrayIndexOutOfBoundsException.js |
||
2 | "use strict"; |
||
3 | |||
4 | // :: DEPENDENCIES |
||
5 | |||
6 | // load native dependencies |
||
7 | 1 | const path = require("path"); |
|
8 | |||
9 | // load local dependencies |
||
10 | 1 | const IndexOutOfBoundsException = require(path.join(__dirname, "IndexOutOfBoundsException.js")); |
|
11 | |||
12 | // :: BASIC SETUP |
||
13 | |||
14 | /** |
||
15 | * Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater |
||
16 | * than or equal to the size of the array. |
||
17 | * @param {String} message - The message describing the <tt>ArrayIndexOutOfBoundsException</tt>. |
||
18 | * @param {Number} code - The unique code that identifies the cause of the <tt>ArrayIndexOutOfBoundsException</tt>. |
||
19 | * @augments IndexOutOfBoundsException |
||
20 | * @constructor |
||
21 | * @see https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html |
||
22 | */ |
||
23 | 1 | const ArrayIndexOutOfBoundsException = function (message, code) { |
|
24 | 197 | IndexOutOfBoundsException.call(this, message, code); |
|
25 | }; |
||
26 | |||
27 | // :: INHERITANCE |
||
28 | |||
29 | // set the IndexOutOfBoundsException 'class' as the parent in the prototype chain |
||
30 | 1 | ArrayIndexOutOfBoundsException.prototype = Object.create(IndexOutOfBoundsException.prototype); |
|
31 | 1 | ArrayIndexOutOfBoundsException.prototype.constructor = IndexOutOfBoundsException; |
|
32 | |||
33 | // :: PROTOTYPE |
||
34 | |||
35 | /** |
||
36 | * The name used to identify a <tt>ArrayIndexOutOfBoundsException</tt>. |
||
37 | * @type {String} |
||
38 | * @default |
||
39 | */ |
||
40 | 1 | ArrayIndexOutOfBoundsException.prototype.name = "ArrayIndexOutOfBoundsException"; |
|
41 | |||
42 | // :: EXPORT |
||
43 | |||
44 | // export the ArrayIndexOutOfBoundsException 'class' |
||
45 | module.exports = ArrayIndexOutOfBoundsException; |