-
Notifications
You must be signed in to change notification settings - Fork 18
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
Runtime errors should provide more context #234
Comments
Also what about source maps? Would in not it also be possible if the hsp compiler produced source maps to also show the exact line in the template on which the error occurred? |
This would be ideal ! |
Yes, it would ideal => an exception plus a line higlighted in the nu-processed file. But I think it will be challenging to do in practice as we are doing many transformations to a given hsp file (compilation, transpilation and potentially minification). I'm not sure how easy / hard would be to generate source maps that take several transformations into account.... |
@PK1A |
Runtime errors during expression evaluation now contain an expression in question which should aid in the debugging. Keeping this issue open if we want to add the file name in question this way or another. Not sure how to apply source maps to this problem but this is one idea of a solution. |
As of today runtime errors don't provide enough context to pin-point the part of the code from which the error actually originates. For example, providing an invalid expression in the DOM event handler will result in the following error:
Ideally I would like to:
The text was updated successfully, but these errors were encountered: