| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 43 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | // ArrayStoreException.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 RuntimeException = require(path.join(__dirname, "RuntimeException.js")); |
|
| 11 | |||
| 12 | // :: BASIC SETUP |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects. |
||
| 16 | * @param {String} message - The message describing the <tt>ArrayStoreException</tt>. |
||
| 17 | * @param {Number} code - The unique code that identifies the cause of the <tt>ArrayStoreException</tt>. |
||
| 18 | * @augments RuntimeException |
||
| 19 | * @constructor |
||
| 20 | * @see https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayStoreException.html |
||
| 21 | */ |
||
| 22 | 1 | const ArrayStoreException = function (message, code) { |
|
| 23 | 196 | RuntimeException.call(this, null, message, code); |
|
| 24 | }; |
||
| 25 | |||
| 26 | // :: INHERITANCE |
||
| 27 | |||
| 28 | // set the RuntimeException 'class' as the parent in the prototype chain |
||
| 29 | 1 | ArrayStoreException.prototype = Object.create(RuntimeException.prototype); |
|
| 30 | 1 | ArrayStoreException.prototype.constructor = RuntimeException; |
|
| 31 | |||
| 32 | // :: PROTOTYPE |
||
| 33 | |||
| 34 | /** |
||
| 35 | * The name used to identify a <tt>ArrayStoreException</tt>. |
||
| 36 | * @type {String} |
||
| 37 | * @default |
||
| 38 | */ |
||
| 39 | 1 | ArrayStoreException.prototype.name = "ArrayStoreException"; |
|
| 40 | |||
| 41 | // :: EXPORT |
||
| 42 | |||
| 43 | // export the ArrayStoreException 'class' |
||
| 44 | module.exports = ArrayStoreException; |