package.cjs.ApiDOMStructuredError.cjs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apidom-error Show documentation
Show all versions of apidom-error Show documentation
Backward compatible custom ApiDOM errors with causes.
The newest version!
"use strict";
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
exports.__esModule = true;
exports.default = void 0;
var _ApiDOMError = _interopRequireDefault(require("./ApiDOMError.cjs"));
class ApiDOMStructuredError extends _ApiDOMError.default {
constructor(message, structuredOptions) {
super(message, structuredOptions);
if (structuredOptions != null && typeof structuredOptions === 'object') {
const {
cause,
...causelessOptions
} = structuredOptions;
Object.assign(this, causelessOptions);
}
}
}
var _default = exports.default = ApiDOMStructuredError;