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

How to catch syntax error and have human readable error ? #118

Closed
jmcollin78 opened this issue Nov 2, 2015 · 3 comments
Closed

How to catch syntax error and have human readable error ? #118

jmcollin78 opened this issue Nov 2, 2015 · 3 comments

Comments

@jmcollin78
Copy link

Hi all,

I wonder how to catch syntax error in template and to have a human readable error (with line and what is wrong).
When I try/catch arround compile I've got only this mysterious error:

SyntaxError: Unexpected token catch while compiling ejs]

Is there any syntax verification function or something like that ?
I suppose this is possible because this test page: http://www.embeddedjs.com/ does display syntax error in a friendly manner.

I try compileDebug and debug without success.

Thank's in advance.

@joaomvfsantos
Copy link

Would really like to know a way to do this too.

@RyanZim
Copy link
Collaborator

RyanZim commented Mar 25, 2016

@jmcollin78: http://www.embeddedjs.com/ is the documentation for a different implementation of EJS.
Ours is at http://ejs.co.

PR's #129 or #130 might make for better errors.

@RyanZim
Copy link
Collaborator

RyanZim commented May 11, 2016

@RyanZim RyanZim closed this as completed Jun 20, 2016
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