Open pselden opened 12 years ago
I looked into this and realized that it's just passing it to the Function method for syntax parsing, so the line numbers might be tricky or impossible to add with the current approach (unless it is done in the parse method).
However, it would be useful to add some additional information, like the filename where it failed to the error message. Would it be possible to catch the exception and do something simple like: e.message += ' in ' + filename; and then rethrow it?
not much we can do as far as line numbers go but yeah we could improve it
The error reporting that ejs does have is really nice, and makes it easy to track down things like undefined variables and so forth.
However, it is lacking when It comes to reporting syntax errors:
Is there any way to improve upon those types of errors and possibly report the line number where it failed on?