1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = void 0;
|
7 |
|
8 | class SassError extends Error {
|
9 | constructor(sassError) {
|
10 | super();
|
11 | this.name = "SassError";
|
12 |
|
13 |
|
14 | this.hideStack = true;
|
15 | Error.captureStackTrace(this, this.constructor);
|
16 |
|
17 | if (typeof sassError.line !== "undefined" || typeof sassError.column !== "undefined") {
|
18 | this.loc = {
|
19 | line: sassError.line,
|
20 | column: sassError.column
|
21 | };
|
22 | }
|
23 |
|
24 |
|
25 | this.message = `${this.name}: ${typeof sassError.message !== "undefined" ? sassError.message : sassError}`;
|
26 |
|
27 | if (sassError.formatted) {
|
28 | this.message = `${this.name}: ${sassError.formatted.replace(/^Error: /, "")}`;
|
29 | }
|
30 | }
|
31 |
|
32 | }
|
33 |
|
34 | var _default = SassError;
|
35 | exports.default = _default; |
\ | No newline at end of file |