Permalink
Browse files

esvalidate: Ensure the consistency of error message

The error message of a fatal (non-tolerated) error should be similar with that
of a tolerated one, i.e. it should include the name of the input file which
triggers the error.

Fix #1688
Closes gh-1690
  • Loading branch information...
1 parent ad622c8 commit 08e0b1f7330ec821b9b3e7a2d5225b0715d8a94c @ariya ariya committed Dec 23, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/esvalidate.js
View
@@ -194,7 +194,7 @@ function run(fname, content) {
console.log(' </testcase>');
console.log('</testsuite>');
} else {
- console.log('Error: ' + e.message);
+ console.log(fname + ':' + e.lineNumber + ': ' + e.message.replace(/^Line\ [0-9]*\:\ /, ''));
}
}
}

0 comments on commit 08e0b1f

Please sign in to comment.