aboutsummaryrefslogtreecommitdiff
path: root/node_modules/postcss-loader/lib/Error.js
blob: 05ea46ea36e7e092602474af9cb09d34981bab7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict'

class SyntaxError extends Error {
  constructor (err) {
    super(err)

    this.name = 'Syntax Error'

    this.message = ''
    this.message += `${this.name} \n\n(${err.line}:${err.column}) ${err.reason}`
    this.message += `\n\n${err.showSourceCode()}\n`

    this.stack = false
  }
}

module.exports = SyntaxError