From 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 21 四月 2026 11:46:41 +0800
Subject: [PATCH] 推送
---
node_modules/webpack/lib/AbstractMethodError.js | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/node_modules/webpack/lib/AbstractMethodError.js b/node_modules/webpack/lib/AbstractMethodError.js
index 527d224..659e01d 100644
--- a/node_modules/webpack/lib/AbstractMethodError.js
+++ b/node_modules/webpack/lib/AbstractMethodError.js
@@ -10,6 +10,8 @@
const CURRENT_METHOD_REGEXP = /at ([a-zA-Z0-9_.]*)/;
/**
+ * Creates the error message shown when an abstract API is called without
+ * being implemented by a subclass.
* @param {string=} method method name
* @returns {string} message
*/
@@ -18,6 +20,8 @@
}
/**
+ * Captures a stack trace so the calling method name can be folded into the
+ * final abstract-method error message.
* @constructor
*/
function Message() {
@@ -35,7 +39,8 @@
}
/**
- * Error for abstract method
+ * Error thrown when code reaches a method that is intended to be overridden by
+ * a subclass.
* @example
* ```js
* class FooClass {
@@ -46,8 +51,13 @@
* ```
*/
class AbstractMethodError extends WebpackError {
+ /**
+ * Creates an error whose message points at the abstract method that was
+ * invoked.
+ */
constructor() {
super(new Message().message);
+ /** @type {string} */
this.name = "AbstractMethodError";
}
}
--
Gitblit v1.9.3