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

Report source location when errors happen #7

Open
andreypopp opened this issue Nov 6, 2013 · 4 comments
Open

Report source location when errors happen #7

andreypopp opened this issue Nov 6, 2013 · 4 comments

Comments

@andreypopp
Copy link

Currently it just throws an error with description, it would be nice if it also provides information from node.position to a user (source if available and line).

@jonathanong
Copy link
Contributor

i haven't looked into rework's source stuff yet. would take a PR!

@jonathanong
Copy link
Contributor

oh that's so simple. did you just want err.position = position? or did you want err.start = position.start, etc. there should be a de factor standard for this.

@tj
Copy link
Member

tj commented Dec 19, 2013

yeah it would be nice if we could just try/catch and make err.message a snippet of near the failure, usually it's something obvious that you can see right away

@jonathanong
Copy link
Contributor

the try/catch should go into rework, not the plugins, right? so you're okay with err.position = position?

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

3 participants