From 95f17a5a7824f72bf326ebead6f0522337b84fd9 Mon Sep 17 00:00:00 2001 From: Memmie Lenglet Date: Tue, 19 Jun 2018 17:54:35 +0200 Subject: [PATCH] feat(error): add column to error string If the error from UglifyJS contains column information, append this to the error message. [terinjokes@gmail.com: rewrote commit message] Signed-off-by: Terin Stock --- lib/gulp-uglify-error.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gulp-uglify-error.js b/lib/gulp-uglify-error.js index ff3f2e0..d613aa6 100644 --- a/lib/gulp-uglify-error.js +++ b/lib/gulp-uglify-error.js @@ -8,7 +8,8 @@ gulpUglifyError.prototype.toString = function() { return ( makeErrorCause.BaseError.prototype.toString.call(this) + (this.fileName ? '\nFile: ' + this.fileName : '') + - (cause.line ? '\nLine: ' + cause.line : '') + (cause.line ? '\nLine: ' + cause.line : '') + + (cause.col ? '\nCol: ' + cause.col : '') ); };