@ayapapa-npm/contracts-js 0.2.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/index.cjs +170 -65
- package/dist/index.d.cts +163 -57
- package/dist/index.d.ts +163 -57
- package/dist/index.js +169 -65
- package/package.json +43 -38
package/dist/index.d.ts
CHANGED
|
@@ -58,33 +58,38 @@ type ConfigKey = keyof Config;
|
|
|
58
58
|
* @module Contracts
|
|
59
59
|
*/
|
|
60
60
|
declare class Contracts {
|
|
61
|
+
#private;
|
|
61
62
|
/**
|
|
62
63
|
* Static fields
|
|
63
64
|
*/
|
|
64
65
|
/** Debug mode state */
|
|
65
66
|
static DEBUG_MODE: boolean;
|
|
66
|
-
/** default configuration */
|
|
67
|
-
private static readonly defaultConf;
|
|
68
67
|
/** logger */
|
|
69
|
-
private static logger;
|
|
70
68
|
/**
|
|
71
69
|
* Configures contract checking behavior.
|
|
72
70
|
*
|
|
73
71
|
* @param config
|
|
74
|
-
* Configuration options.
|
|
75
|
-
*
|
|
76
|
-
* The `debug` property
|
|
77
|
-
*
|
|
78
|
-
*
|
|
72
|
+
* Configuration options. <br>
|
|
73
|
+
* <br>
|
|
74
|
+
* The `debug` property toggles the behavior—specifically,
|
|
75
|
+
* throwing an exception or outputting to the console when the condition is
|
|
76
|
+
* false—for the validation of contracts intended for use during debugging (methods ending in `_DEBUG`). <br>
|
|
77
|
+
* <br>
|
|
79
78
|
* When `debug` is `true`,
|
|
80
|
-
* methods ending with `_DEBUG` perform validation.
|
|
81
|
-
*
|
|
82
|
-
* When `debug` is `false
|
|
83
|
-
* methods ending with `_DEBUG` skip validation.
|
|
84
|
-
*
|
|
79
|
+
* methods ending with `_DEBUG` perform validation. <br>
|
|
80
|
+
* <br>
|
|
81
|
+
* When `debug` is `false`,
|
|
82
|
+
* methods ending with `_DEBUG` skip validation. <br>
|
|
83
|
+
* <br>
|
|
85
84
|
* Is the `logger` property is specified,
|
|
86
85
|
* it is used instead of the standard logger, `console`.
|
|
87
|
-
* This module uses only the `error` method of the `logger`.
|
|
86
|
+
* This module uses only the `error` method of the `logger`. <br>
|
|
87
|
+
* <br>
|
|
88
|
+
* Note: If the value of a property is `undefined`, it is treated as unspecified.
|
|
89
|
+
*
|
|
90
|
+
* @param reset
|
|
91
|
+
* If `true`, unspecified values are saved to the settings as default values. <br>
|
|
92
|
+
* If `false`, unspecified values remain at their current settings.
|
|
88
93
|
*
|
|
89
94
|
* @example
|
|
90
95
|
* // Use a logger that is slightly more advanced than the standard logger—namely, `console`.
|
|
@@ -94,7 +99,22 @@ declare class Contracts {
|
|
|
94
99
|
* Contracts.setConfig({ debug: true, logger: prettyConsole });
|
|
95
100
|
* // Node: ` The `logger` property is optional.
|
|
96
101
|
*/
|
|
97
|
-
static setConfig(config: Config): void;
|
|
102
|
+
static setConfig(config: Config, reset?: boolean): void;
|
|
103
|
+
/**
|
|
104
|
+
* Get the default configurations.
|
|
105
|
+
* @returns Default configurations.
|
|
106
|
+
*/
|
|
107
|
+
static getDefaultConfig(): Required<Config>;
|
|
108
|
+
/**
|
|
109
|
+
* Get the current configurations.
|
|
110
|
+
* @returns Default configurations.
|
|
111
|
+
*/
|
|
112
|
+
static getConfig(): Required<Config>;
|
|
113
|
+
/**
|
|
114
|
+
* Reset the current configurations to the default configurations.
|
|
115
|
+
* @returns Default configurations.
|
|
116
|
+
*/
|
|
117
|
+
static resetConfig(): void;
|
|
98
118
|
/**
|
|
99
119
|
* Verifies an intermediate condition during execution.
|
|
100
120
|
*
|
|
@@ -113,13 +133,14 @@ declare class Contracts {
|
|
|
113
133
|
* - Check temporary assumptions during execution.
|
|
114
134
|
*
|
|
115
135
|
* @param isOk
|
|
116
|
-
* Condition result
|
|
136
|
+
* Condition result(`boolean`) to be verified.
|
|
117
137
|
*
|
|
118
|
-
* @param
|
|
138
|
+
* @param ngMsg
|
|
119
139
|
* Failure message.
|
|
120
140
|
*
|
|
121
|
-
* @param
|
|
141
|
+
* @param ErrorClass
|
|
122
142
|
* Error constructor used when the check fails.
|
|
143
|
+
* This is used as follows: throw Object.assign(new ErrorClass(msg, eParams), eProps);
|
|
123
144
|
*
|
|
124
145
|
* Supported values:
|
|
125
146
|
* - `Error` (default)
|
|
@@ -128,7 +149,10 @@ declare class Contracts {
|
|
|
128
149
|
* - Custom Error subclasses
|
|
129
150
|
* - `null` to skip throwing and log the failure.
|
|
130
151
|
*
|
|
131
|
-
* @param
|
|
152
|
+
* @param eParams
|
|
153
|
+
* Parameter options following the message passed to the Error constructor.
|
|
154
|
+
*
|
|
155
|
+
* @param eProps
|
|
132
156
|
* Additional properties assigned to the error object.
|
|
133
157
|
*
|
|
134
158
|
* @returns
|
|
@@ -142,7 +166,11 @@ declare class Contracts {
|
|
|
142
166
|
* 'Calculation result must not be negative'
|
|
143
167
|
* );
|
|
144
168
|
*/
|
|
145
|
-
static VERIFY(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null,
|
|
169
|
+
static VERIFY(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null, eParams?: {
|
|
170
|
+
[key: string]: any;
|
|
171
|
+
} | null, eProps?: {
|
|
172
|
+
[key: string]: any;
|
|
173
|
+
} | null): boolean;
|
|
146
174
|
/**
|
|
147
175
|
* Verifies an intermediate condition in debug mode only.
|
|
148
176
|
*
|
|
@@ -157,13 +185,14 @@ declare class Contracts {
|
|
|
157
185
|
* - Check internal assumptions while debugging.
|
|
158
186
|
*
|
|
159
187
|
* @param isOk
|
|
160
|
-
* Condition result
|
|
188
|
+
* Condition result(`boolean`) to be verified.
|
|
161
189
|
*
|
|
162
|
-
* @param
|
|
190
|
+
* @param ngMsg
|
|
163
191
|
* Failure message.
|
|
164
192
|
*
|
|
165
|
-
* @param
|
|
193
|
+
* @param ErrorClass
|
|
166
194
|
* Error constructor used when the check fails.
|
|
195
|
+
* This is used as follows: throw Object.assign(new ErrorClass(msg, eParams), eProps);
|
|
167
196
|
*
|
|
168
197
|
* Supported values:
|
|
169
198
|
* - `Error` (default)
|
|
@@ -172,7 +201,10 @@ declare class Contracts {
|
|
|
172
201
|
* - Custom Error subclasses
|
|
173
202
|
* - `null` to skip throwing and log the failure.
|
|
174
203
|
*
|
|
175
|
-
* @param
|
|
204
|
+
* @param eParams
|
|
205
|
+
* Parameter options following the message passed to the Error constructor.
|
|
206
|
+
*
|
|
207
|
+
* @param eProps
|
|
176
208
|
* Additional properties assigned to the error object.
|
|
177
209
|
*
|
|
178
210
|
* @returns
|
|
@@ -184,7 +216,11 @@ declare class Contracts {
|
|
|
184
216
|
* 'Intermediate value must not be null'
|
|
185
217
|
* );
|
|
186
218
|
*/
|
|
187
|
-
static VERIFY_DEBUG(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null,
|
|
219
|
+
static VERIFY_DEBUG(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null, eParams?: {
|
|
220
|
+
[key: string]: any;
|
|
221
|
+
} | null, eProps?: {
|
|
222
|
+
[key: string]: any;
|
|
223
|
+
} | null): boolean;
|
|
188
224
|
/**
|
|
189
225
|
* Checks a precondition before execution.
|
|
190
226
|
*
|
|
@@ -199,13 +235,14 @@ declare class Contracts {
|
|
|
199
235
|
* - Check required external conditions.
|
|
200
236
|
*
|
|
201
237
|
* @param isOk
|
|
202
|
-
* Condition result
|
|
238
|
+
* Condition result(`boolean`) to be verified.
|
|
203
239
|
*
|
|
204
|
-
* @param
|
|
240
|
+
* @param ngMsg
|
|
205
241
|
* Failure message.
|
|
206
242
|
*
|
|
207
|
-
* @param
|
|
243
|
+
* @param ErrorClass
|
|
208
244
|
* Error constructor used when the check fails.
|
|
245
|
+
* This is used as follows: throw Object.assign(new ErrorClass(msg, eParams), eProps);
|
|
209
246
|
*
|
|
210
247
|
* Supported values:
|
|
211
248
|
* - `Error` (default)
|
|
@@ -214,7 +251,10 @@ declare class Contracts {
|
|
|
214
251
|
* - Custom Error subclasses
|
|
215
252
|
* - `null` to skip throwing and log the failure.
|
|
216
253
|
*
|
|
217
|
-
* @param
|
|
254
|
+
* @param eParams
|
|
255
|
+
* Parameter options following the message passed to the Error constructor.
|
|
256
|
+
*
|
|
257
|
+
* @param eProps
|
|
218
258
|
* Additional properties assigned to the error object.
|
|
219
259
|
*
|
|
220
260
|
* @returns
|
|
@@ -235,7 +275,11 @@ declare class Contracts {
|
|
|
235
275
|
* return a / b;
|
|
236
276
|
* }
|
|
237
277
|
*/
|
|
238
|
-
static REQUIRE(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null,
|
|
278
|
+
static REQUIRE(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null, eParams?: {
|
|
279
|
+
[key: string]: any;
|
|
280
|
+
} | null, eProps?: {
|
|
281
|
+
[key: string]: any;
|
|
282
|
+
} | null): boolean;
|
|
239
283
|
/**
|
|
240
284
|
* Checks a precondition in debug mode only.
|
|
241
285
|
*
|
|
@@ -250,13 +294,14 @@ declare class Contracts {
|
|
|
250
294
|
* - Perform additional argument checks while debugging.
|
|
251
295
|
*
|
|
252
296
|
* @param isOk
|
|
253
|
-
* Condition result
|
|
297
|
+
* Condition result(`boolean`) to be verified.
|
|
254
298
|
*
|
|
255
|
-
* @param
|
|
299
|
+
* @param ngMsg
|
|
256
300
|
* Failure message.
|
|
257
301
|
*
|
|
258
|
-
* @param
|
|
302
|
+
* @param ErrorClass
|
|
259
303
|
* Error constructor used when the check fails.
|
|
304
|
+
* This is used as follows: throw Object.assign(new ErrorClass(msg, eParams), eProps);
|
|
260
305
|
*
|
|
261
306
|
* Supported values:
|
|
262
307
|
* - `Error` (default)
|
|
@@ -265,7 +310,10 @@ declare class Contracts {
|
|
|
265
310
|
* - Custom Error subclasses
|
|
266
311
|
* - `null` to skip throwing and log the failure.
|
|
267
312
|
*
|
|
268
|
-
* @param
|
|
313
|
+
* @param eParams
|
|
314
|
+
* Parameter options following the message passed to the Error constructor.
|
|
315
|
+
*
|
|
316
|
+
* @param eProps
|
|
269
317
|
* Additional properties assigned to the error object.
|
|
270
318
|
*
|
|
271
319
|
* @returns
|
|
@@ -277,7 +325,11 @@ declare class Contracts {
|
|
|
277
325
|
* 'User must exist during debugging'
|
|
278
326
|
* );
|
|
279
327
|
*/
|
|
280
|
-
static REQUIRE_DEBUG(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null,
|
|
328
|
+
static REQUIRE_DEBUG(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null, eParams?: {
|
|
329
|
+
[key: string]: any;
|
|
330
|
+
} | null, eProps?: {
|
|
331
|
+
[key: string]: any;
|
|
332
|
+
} | null): boolean;
|
|
281
333
|
/**
|
|
282
334
|
* Checks a postcondition after execution.
|
|
283
335
|
*
|
|
@@ -293,13 +345,14 @@ declare class Contracts {
|
|
|
293
345
|
* - Verify that processing completed correctly.
|
|
294
346
|
*
|
|
295
347
|
* @param isOk
|
|
296
|
-
* Condition result
|
|
348
|
+
* Condition result(`boolean`) to be verified.
|
|
297
349
|
*
|
|
298
|
-
* @param
|
|
350
|
+
* @param ngMsg
|
|
299
351
|
* Failure message.
|
|
300
352
|
*
|
|
301
|
-
* @param
|
|
353
|
+
* @param ErrorClass
|
|
302
354
|
* Error constructor used when the check fails.
|
|
355
|
+
* This is used as follows: throw Object.assign(new ErrorClass(msg, eParams), eProps);
|
|
303
356
|
*
|
|
304
357
|
* Supported values:
|
|
305
358
|
* - `Error` (default)
|
|
@@ -308,7 +361,10 @@ declare class Contracts {
|
|
|
308
361
|
* - Custom Error subclasses
|
|
309
362
|
* - `null` to skip throwing and log the failure.
|
|
310
363
|
*
|
|
311
|
-
* @param
|
|
364
|
+
* @param eParams
|
|
365
|
+
* Parameter options following the message passed to the Error constructor.
|
|
366
|
+
*
|
|
367
|
+
* @param eProps
|
|
312
368
|
* Additional properties assigned to the error object.
|
|
313
369
|
*
|
|
314
370
|
* @returns
|
|
@@ -331,7 +387,11 @@ declare class Contracts {
|
|
|
331
387
|
* return result;
|
|
332
388
|
* }
|
|
333
389
|
*/
|
|
334
|
-
static ENSURE(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null,
|
|
390
|
+
static ENSURE(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null, eParams?: {
|
|
391
|
+
[key: string]: any;
|
|
392
|
+
} | null, eProps?: {
|
|
393
|
+
[key: string]: any;
|
|
394
|
+
} | null): boolean;
|
|
335
395
|
/**
|
|
336
396
|
* Checks a postcondition in debug mode only.
|
|
337
397
|
*
|
|
@@ -346,13 +406,14 @@ declare class Contracts {
|
|
|
346
406
|
* - Confirm internal behavior while debugging.
|
|
347
407
|
*
|
|
348
408
|
* @param isOk
|
|
349
|
-
* Condition result
|
|
409
|
+
* Condition result(`boolean`) to be verified.
|
|
350
410
|
*
|
|
351
|
-
* @param
|
|
411
|
+
* @param ngMsg
|
|
352
412
|
* Failure message.
|
|
353
413
|
*
|
|
354
|
-
* @param
|
|
414
|
+
* @param ErrorClass
|
|
355
415
|
* Error constructor used when the check fails.
|
|
416
|
+
* This is used as follows: throw Object.assign(new ErrorClass(msg, eParams), eProps);
|
|
356
417
|
*
|
|
357
418
|
* Supported values:
|
|
358
419
|
* - `Error` (default)
|
|
@@ -361,7 +422,10 @@ declare class Contracts {
|
|
|
361
422
|
* - Custom Error subclasses
|
|
362
423
|
* - `null` to skip throwing and log the failure.
|
|
363
424
|
*
|
|
364
|
-
* @param
|
|
425
|
+
* @param eParams
|
|
426
|
+
* Parameter options following the message passed to the Error constructor.
|
|
427
|
+
*
|
|
428
|
+
* @param eProps
|
|
365
429
|
* Additional properties assigned to the error object.
|
|
366
430
|
*
|
|
367
431
|
* @returns
|
|
@@ -373,7 +437,11 @@ declare class Contracts {
|
|
|
373
437
|
* 'Result should exist during debugging'
|
|
374
438
|
* );
|
|
375
439
|
*/
|
|
376
|
-
static ENSURE_DEBUG(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null,
|
|
440
|
+
static ENSURE_DEBUG(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null, eParams?: {
|
|
441
|
+
[key: string]: any;
|
|
442
|
+
} | null, eProps?: {
|
|
443
|
+
[key: string]: any;
|
|
444
|
+
} | null): boolean;
|
|
377
445
|
/**
|
|
378
446
|
* Checks an invariant condition.
|
|
379
447
|
*
|
|
@@ -389,13 +457,14 @@ declare class Contracts {
|
|
|
389
457
|
* INVARIANT represents conditions that must always remain true.
|
|
390
458
|
*
|
|
391
459
|
* @param isOk
|
|
392
|
-
* Condition result
|
|
460
|
+
* Condition result(`boolean`) to be verified.
|
|
393
461
|
*
|
|
394
|
-
* @param
|
|
462
|
+
* @param ngMsg
|
|
395
463
|
* Failure message.
|
|
396
464
|
*
|
|
397
|
-
* @param
|
|
465
|
+
* @param ErrorClass
|
|
398
466
|
* Error constructor used when the check fails.
|
|
467
|
+
* This is used as follows: throw Object.assign(new ErrorClass(msg, eParams), eProps);
|
|
399
468
|
*
|
|
400
469
|
* Supported values:
|
|
401
470
|
* - `Error` (default)
|
|
@@ -404,7 +473,10 @@ declare class Contracts {
|
|
|
404
473
|
* - Custom Error subclasses
|
|
405
474
|
* - `null` to skip throwing and log the failure.
|
|
406
475
|
*
|
|
407
|
-
* @param
|
|
476
|
+
* @param eParams
|
|
477
|
+
* Parameter options following the message passed to the Error constructor.
|
|
478
|
+
*
|
|
479
|
+
* @param eProps
|
|
408
480
|
* Additional properties assigned to the error object.
|
|
409
481
|
*
|
|
410
482
|
* @returns
|
|
@@ -424,7 +496,11 @@ declare class Contracts {
|
|
|
424
496
|
*
|
|
425
497
|
* }
|
|
426
498
|
*/
|
|
427
|
-
static INVARIANT(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null,
|
|
499
|
+
static INVARIANT(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null, eParams?: {
|
|
500
|
+
[key: string]: any;
|
|
501
|
+
} | null, eProps?: {
|
|
502
|
+
[key: string]: any;
|
|
503
|
+
} | null): boolean;
|
|
428
504
|
/**
|
|
429
505
|
* Checks an invariant condition in debug mode only.
|
|
430
506
|
*
|
|
@@ -439,13 +515,14 @@ declare class Contracts {
|
|
|
439
515
|
* - Detect unexpected state changes while debugging.
|
|
440
516
|
*
|
|
441
517
|
* @param isOk
|
|
442
|
-
* Condition result
|
|
518
|
+
* Condition result(`boolean`) to be verified.
|
|
443
519
|
*
|
|
444
520
|
* @param [ngMsg]
|
|
445
521
|
* Failure message.
|
|
446
522
|
*
|
|
447
523
|
* @param [ErrorClass=Error]
|
|
448
524
|
* Error constructor used when the check fails.
|
|
525
|
+
* This is used as follows: throw Object.assign(new ErrorClass(msg, eParams), eProps);
|
|
449
526
|
*
|
|
450
527
|
* Supported values:
|
|
451
528
|
* - `Error` (default)
|
|
@@ -454,6 +531,9 @@ declare class Contracts {
|
|
|
454
531
|
* - Custom Error subclasses
|
|
455
532
|
* - `null` to skip throwing and log the failure.
|
|
456
533
|
*
|
|
534
|
+
* @param eParams
|
|
535
|
+
* Parameter options following the message passed to the Error constructor.
|
|
536
|
+
*
|
|
457
537
|
* @param [eProps = {}]
|
|
458
538
|
* Additional properties assigned to the error object.
|
|
459
539
|
*
|
|
@@ -466,7 +546,11 @@ declare class Contracts {
|
|
|
466
546
|
* 'Cache size exceeded expected limit'
|
|
467
547
|
* );
|
|
468
548
|
*/
|
|
469
|
-
static INVARIANT_DEBUG(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null,
|
|
549
|
+
static INVARIANT_DEBUG(isOk: boolean, ngMsg: string | null, ErrorClass?: (new (...args: any[]) => Error) | null, eParams?: {
|
|
550
|
+
[key: string]: any;
|
|
551
|
+
} | null, eProps?: {
|
|
552
|
+
[key: string]: any;
|
|
553
|
+
} | null): boolean;
|
|
470
554
|
/**
|
|
471
555
|
* Core contract evaluation logic.
|
|
472
556
|
*
|
|
@@ -484,7 +568,7 @@ declare class Contracts {
|
|
|
484
568
|
* @internal
|
|
485
569
|
*
|
|
486
570
|
* @param isOk
|
|
487
|
-
* Condition result.
|
|
571
|
+
* Condition result(`boolean`) to be verified.
|
|
488
572
|
*
|
|
489
573
|
* @param prefix
|
|
490
574
|
* Contract type prefix used in the error message.
|
|
@@ -493,7 +577,18 @@ declare class Contracts {
|
|
|
493
577
|
* Failure message.
|
|
494
578
|
*
|
|
495
579
|
* @param ErrorClass
|
|
496
|
-
* Error constructor.
|
|
580
|
+
* Error constructor used when the check fails.
|
|
581
|
+
* This is used as follows: throw Object.assign(new ErrorClass(msg, eParams), eProps);
|
|
582
|
+
*
|
|
583
|
+
* Supported values:
|
|
584
|
+
* - `Error` (default)
|
|
585
|
+
* - `TypeError`
|
|
586
|
+
* - `RangeError`
|
|
587
|
+
* - Custom Error subclasses
|
|
588
|
+
* - `null` to skip throwing and log the failure.
|
|
589
|
+
*
|
|
590
|
+
* @param eParams
|
|
591
|
+
* Parameter options following the message passed to the Error constructor.
|
|
497
592
|
*
|
|
498
593
|
* @param eProps
|
|
499
594
|
* Additional properties assigned to the error object.
|
|
@@ -516,7 +611,7 @@ declare class Contracts {
|
|
|
516
611
|
* @internal
|
|
517
612
|
*
|
|
518
613
|
* @param isOk
|
|
519
|
-
* Condition result.
|
|
614
|
+
* Condition result(`boolean`) to be verified.
|
|
520
615
|
*
|
|
521
616
|
* @param prefix
|
|
522
617
|
* Contract type prefix used in the error message.
|
|
@@ -524,8 +619,19 @@ declare class Contracts {
|
|
|
524
619
|
* @param ngMsg
|
|
525
620
|
* Failure message.
|
|
526
621
|
*
|
|
527
|
-
* @param ErrorClass
|
|
528
|
-
* Error constructor.
|
|
622
|
+
* @param ErrorClass=Error
|
|
623
|
+
* Error constructor used when the check fails.
|
|
624
|
+
* This is used as follows: throw Object.assign(new ErrorClass(msg, eParams), eProps);
|
|
625
|
+
*
|
|
626
|
+
* Supported values:
|
|
627
|
+
* - `Error` (default)
|
|
628
|
+
* - `TypeError`
|
|
629
|
+
* - `RangeError`
|
|
630
|
+
* - Custom Error subclasses
|
|
631
|
+
* - `null` to skip throwing and log the failure.
|
|
632
|
+
*
|
|
633
|
+
* @param eParams
|
|
634
|
+
* Parameter options following the message passed to the Error constructor.
|
|
529
635
|
*
|
|
530
636
|
* @param eProps
|
|
531
637
|
* Additional properties assigned to the error object.
|