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

Highlight column number of errors #43

Open
toolness opened this issue Apr 16, 2016 · 0 comments
Open

Highlight column number of errors #43

toolness opened this issue Apr 16, 2016 · 0 comments

Comments

@toolness
Copy link
Owner

toolness commented Apr 16, 2016

The exception information we receive when running user sketches also includes information about the column number of the error. While this can sometimes be misleading, especially with syntax errors, it might also help the user locate the error more easily.

Note that we'll have to figure out a solution for the implicit setup() functionality. While line numbers are preserved in that case, column numbers on the first line aren't. Options here include:

  • Implement a hack whereby we detect whether the error is on the first line, and then subtract a constant from the column number if so. This takes advantage of the fact that our mangling is very simple.
  • Use source maps. This also means integrating something like stacktrace.js, since browser stack traces aren't source-mapped. It's a much bigger lift, but it'd pave the way for supporting features like transpiling to ES2015 and other languages in the future.
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