Last change
on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
891 bytes
|
Line | |
---|
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 | this.originalSassError = sassError;
|
---|
13 | this.loc = {
|
---|
14 | line: sassError.line,
|
---|
15 | column: sassError.column
|
---|
16 | }; // Keep original error if `sassError.formatted` is unavailable
|
---|
17 |
|
---|
18 | this.message = `${this.name}: ${this.originalSassError.message}`;
|
---|
19 |
|
---|
20 | if (this.originalSassError.formatted) {
|
---|
21 | this.message = `${this.name}: ${this.originalSassError.formatted.replace(/^Error: /, "")}`; // Instruct webpack to hide the JS stack from the console.
|
---|
22 | // Usually you're only interested in the SASS stack in this case.
|
---|
23 |
|
---|
24 | this.hideStack = true;
|
---|
25 | Error.captureStackTrace(this, this.constructor);
|
---|
26 | }
|
---|
27 | }
|
---|
28 |
|
---|
29 | }
|
---|
30 |
|
---|
31 | var _default = SassError;
|
---|
32 | exports.default = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.