From 3bf0a33d7bbf57ea947553ad4e29c6e4753007e8 Mon Sep 17 00:00:00 2001 From: Michael Ciniawsky Date: Sat, 14 Oct 2017 16:59:15 +0200 Subject: [PATCH] refactor(lib/Error): remove unused branches --- lib/Error.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/Error.js b/lib/Error.js index 37247d7c..05ea46ea 100644 --- a/lib/Error.js +++ b/lib/Error.js @@ -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 }