1 | function PostCSSLoaderError(error) {
|
2 | Error.call(this);
|
3 | Error.captureStackTrace(this, PostCSSLoaderError);
|
4 | this.name = 'Syntax Error';
|
5 | this.error = error.input.source;
|
6 | this.message = error.reason;
|
7 | if ( error.line ) {
|
8 | this.message += ' (' + error.line + ':' + error.column + ')';
|
9 | }
|
10 | if ( error.line && error.input.source ) {
|
11 | this.message += '\n\n' + error.showSourceCode() + '\n';
|
12 | }
|
13 | this.hideStack = true;
|
14 | }
|
15 |
|
16 | PostCSSLoaderError.prototype = Object.create(Error.prototype);
|
17 | PostCSSLoaderError.prototype.constructor = PostCSSLoaderError;
|
18 |
|
19 | module.exports = PostCSSLoaderError;
|