Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better exception stack trace #2

Open
larryhe opened this issue Oct 29, 2013 · 0 comments
Open

better exception stack trace #2

larryhe opened this issue Oct 29, 2013 · 0 comments

Comments

@larryhe
Copy link

larryhe commented Oct 29, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant