Skip to content

Commit

Permalink
refactor(lib/Error): remove unused branches (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-ciniawsky committed Oct 14, 2017
1 parent d39b84e commit e7e5478
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions lib/Error.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,11 @@ 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.message = ''
this.message += `${this.name} \n\n(${err.line}:${err.column}) ${err.reason}`
this.message += `\n\n${err.showSourceCode()}\n`

this.stack = false
}
Expand Down

0 comments on commit e7e5478

Please sign in to comment.