Skip to content

Commit 85ee62c

Browse files
committed
chore(transpiler): show filepath when error happens
1 parent 94e5564 commit 85ee62c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/transpiler/gulp-traceur.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function gulpTraceur(options, resolveModuleName) {
2020
}
2121

2222
try {
23+
var originalFilePath = file.history[0];
2324
var moduleName = resolveModuleName ? resolveModuleName(file.relative) : null;
2425
var compiled = compiler.compile(options, {
2526
inputPath: file.relative,
@@ -33,6 +34,7 @@ function gulpTraceur(options, resolveModuleName) {
3334
if (errors.join) {
3435
throw new Error('gulp-traceur: '+errors.join('\n'));
3536
} else {
37+
console.error('Error when transpiling:\n ' + originalFilePath);
3638
throw errors;
3739
}
3840
}

0 commit comments

Comments
 (0)