1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = void 0;
|
7 |
|
8 | class CssSyntaxError extends Error {
|
9 | constructor(error) {
|
10 | super(error);
|
11 | const {
|
12 | reason,
|
13 | line,
|
14 | column,
|
15 | file
|
16 | } = error;
|
17 | this.name = "CssSyntaxError";
|
18 |
|
19 |
|
20 | this.message = `${this.name}\n\n`;
|
21 |
|
22 | if (typeof line !== "undefined") {
|
23 | this.message += `(${line}:${column}) `;
|
24 | }
|
25 |
|
26 | this.message += file ? `${file} ` : "<css input> ";
|
27 | this.message += `${reason}`;
|
28 | const code = error.showSourceCode();
|
29 |
|
30 | if (code) {
|
31 | this.message += `\n\n${code}\n`;
|
32 | }
|
33 |
|
34 |
|
35 | this.stack = false;
|
36 | }
|
37 |
|
38 | }
|
39 |
|
40 | exports.default = CssSyntaxError; |
\ | No newline at end of file |