|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.1 KB
|
| 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"; // TODO remove me in the next major release
|
|---|
| 12 |
|
|---|
| 13 | this.originalSassError = sassError;
|
|---|
| 14 |
|
|---|
| 15 | if (typeof sassError.line !== "undefined" || typeof sassError.column !== "undefined") {
|
|---|
| 16 | this.loc = {
|
|---|
| 17 | line: sassError.line,
|
|---|
| 18 | column: sassError.column
|
|---|
| 19 | };
|
|---|
| 20 | } // Keep original error if `sassError.formatted` is unavailable
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 | this.message = `${this.name}: ${typeof this.originalSassError.message !== "undefined" ? this.originalSassError.message : this.originalSassError}`;
|
|---|
| 24 |
|
|---|
| 25 | if (this.originalSassError.formatted) {
|
|---|
| 26 | this.message = `${this.name}: ${this.originalSassError.formatted.replace(/^Error: /, "")}`; // Instruct webpack to hide the JS stack from the console.
|
|---|
| 27 | // Usually you're only interested in the SASS stack in this case.
|
|---|
| 28 |
|
|---|
| 29 | this.hideStack = true;
|
|---|
| 30 | Error.captureStackTrace(this, this.constructor);
|
|---|
| 31 | }
|
|---|
| 32 | }
|
|---|
| 33 |
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | var _default = SassError;
|
|---|
| 37 | exports.default = _default; |
|---|
Note:
See
TracBrowser
for help on using the repository browser.