From 85ee62cb0d58f88b9c66fcaf40465e6147a39068 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Thu, 9 Oct 2014 15:17:53 -0700 Subject: [PATCH] chore(transpiler): show filepath when error happens --- tools/transpiler/gulp-traceur.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/transpiler/gulp-traceur.js b/tools/transpiler/gulp-traceur.js index e59390a1d0..cf1a91b0a3 100644 --- a/tools/transpiler/gulp-traceur.js +++ b/tools/transpiler/gulp-traceur.js @@ -20,6 +20,7 @@ function gulpTraceur(options, resolveModuleName) { } try { + var originalFilePath = file.history[0]; var moduleName = resolveModuleName ? resolveModuleName(file.relative) : null; var compiled = compiler.compile(options, { inputPath: file.relative, @@ -33,6 +34,7 @@ function gulpTraceur(options, resolveModuleName) { if (errors.join) { throw new Error('gulp-traceur: '+errors.join('\n')); } else { + console.error('Error when transpiling:\n ' + originalFilePath); throw errors; } }