| | |
| | | * @param {{ cause?: unknown }} options error options |
| | | */ |
| | | constructor(message, options = {}) { |
| | | // @ts-expect-error ES2018 doesn't `Error.cause`, but it can be used by developers |
| | | super(message, options); |
| | | |
| | | /** @type {string=} */ |
| | |
| | | this.file = undefined; |
| | | } |
| | | |
| | | /** |
| | | * Returns inspect message. |
| | | * @returns {string} inspect message |
| | | */ |
| | | [inspect]() { |
| | | return ( |
| | | this.stack + |
| | |
| | | } |
| | | |
| | | /** |
| | | * Serializes this instance into the provided serializer context. |
| | | * @param {ObjectSerializerContext} context context |
| | | */ |
| | | serialize({ write }) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Restores this instance from the provided deserializer context. |
| | | * @param {ObjectDeserializerContext} context context |
| | | */ |
| | | deserialize({ read }) { |
| | |
| | | |
| | | makeSerializable(WebpackError, "webpack/lib/WebpackError"); |
| | | |
| | | /** @type {typeof WebpackError} */ |
| | | module.exports = WebpackError; |