Files
old-slucajna-televizija/web/node_modules/postcss-loader/lib/Error.js
2017-10-16 11:19:46 +02:00

25 lines
431 B
JavaScript

'use strict'
class SyntaxError extends Error {
constructor (err) {
super(err)
this.err = err.input.source
this.name = 'Syntax Error'
this.message = ''
if (err.line) {
this.message += `${this.name} \n\n(${err.line}:${err.column}) ${err.reason}`
}
if (err.input.source) {
this.message += `\n\n${err.showSourceCode()}\n`
}
this.stack = false
}
}
module.exports = SyntaxError