better exception stack trace
Today, i use javascript-ctags to generate javascript tags for a huge project(with hundreds of JS files) and I got below errors, which didn't provide too much useful information to user which files caused this. I spent hours to figure which file caused the problem. As a suggestion, I think it's better to append the source file to the exception stack trace.
/usr/local/lib/node_modules/javascript-ctags/node_modules/esprima/esprima.js:3872 throw e; ^ Error: Line 1: Unexpected token ( at throwError (/usr/local/lib/node_modules/javascript-ctags/node_modules/esprima/esprima.js:1156:21) at throwUnexpected (/usr/local/lib/node_modules/javascript-ctags/node_modules/esprima/esprima.js:1213:9) at parseVariableIdentifier (/usr/local/lib/node_modules/javascript-ctags/node_modules/esprima/esprima.js:2081:13) at /usr/local/lib/node_modules/javascript-ctags/node_modules/esprima/esprima.js:3609:38 at parseFunctionDeclaration (/usr/local/lib/node_modules/javascript-ctags/node_modules/esprima/esprima.js:2884:14) at /usr/local/lib/node_modules/javascript-ctags/node_modules/esprima/esprima.js:3609:38 at parseSourceElement (/usr/local/lib/node_modules/javascript-ctags/node_modules/esprima/esprima.js:3055:24) at parseSourceElements (/usr/local/lib/node_modules/javascript-ctags/node_modules/esprima/esprima.js:3095:29) at parseProgram (/usr/local/lib/node_modules/javascript-ctags/node_modules/esprima/esprima.js:3109:19) at /usr/local/lib/node_modules/javascript-ctags/node_modules/esprima/esprima.js:3609:38