main
Last change
on this file since 65b6638 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
436 bytes
|
Line | |
---|
1 | import ApiDOMError from "./ApiDOMError.mjs";
|
---|
2 | class ApiDOMStructuredError extends ApiDOMError {
|
---|
3 | constructor(message, structuredOptions) {
|
---|
4 | super(message, structuredOptions);
|
---|
5 | if (structuredOptions != null && typeof structuredOptions === 'object') {
|
---|
6 | const {
|
---|
7 | cause,
|
---|
8 | ...causelessOptions
|
---|
9 | } = structuredOptions;
|
---|
10 | Object.assign(this, causelessOptions);
|
---|
11 | }
|
---|
12 | }
|
---|
13 | }
|
---|
14 | export default ApiDOMStructuredError; |
---|
Note:
See
TracBrowser
for help on using the repository browser.