WXL
4 天以前 2cc85c64f1c64a2dbaeae276a3e2ca8420de76b7
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";
   }
}