123456789101112131415161718192021222324252627282930313233343536 |
- "use strict";
- class Warning extends Error {
- constructor(warning) {
- super(warning);
- const {
- text,
- line,
- column,
- plugin
- } = warning;
- this.name = "Warning";
- this.message = `${this.name}\n\n`;
- if (typeof line !== "undefined") {
- this.message += `(${line}:${column}) `;
- }
- this.message += plugin ? `${plugin}: ` : "";
- this.message += `${text}`;
- this.stack = false;
- }
- }
- module.exports = Warning;
|