1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.ArgumentError = void 0;
|
4 | /**
|
5 | @hidden
|
6 | */
|
7 | class ArgumentError extends Error {
|
8 | constructor(message, context) {
|
9 | super(message);
|
10 | if (Error.captureStackTrace) {
|
11 | // TODO: Node.js does not preserve the error name in output when using the below, why?
|
12 | Error.captureStackTrace(this, context);
|
13 | }
|
14 | else {
|
15 | this.stack = (new Error()).stack;
|
16 | }
|
17 | this.name = 'ArgumentError';
|
18 | }
|
19 | }
|
20 | exports.ArgumentError = ArgumentError;
|