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

fix: validate compiler arguments #100

Closed
wants to merge 1 commit into from

Conversation

PK1A
Copy link
Contributor

@PK1A PK1A commented Mar 14, 2014

Not sure if this is JavaScriptish way of doing those checks, but at least arguments are verified now. I've bumped already several times into obscure err messages from a compiler when not providing a second argument so I really like to fix this one, this way or another.

@PK1A
Copy link
Contributor Author

PK1A commented Mar 14, 2014

One more remark - this PR changes how fatal errors are communicated by throwing an exception. This partly solves #61

@benouat
Copy link
Member

benouat commented Mar 17, 2014

I might be the only one, but I am still not in favor of this change...
To me, if not provided it should silently fallback to "anonymous".

With this change, if you want to play from a pure browser point of view, with template content coming from <script ></script>, we are simply forcing the user to put this anything/anonymous parameter, which is bad.

I understand that it is really needed for errors purpose when used server-side, but still ....

@PK1A PK1A closed this in 1cb8cc9 May 6, 2014
@PK1A
Copy link
Contributor Author

PK1A commented May 6, 2014

Finally I've merged this one as today the second argument is mandatory - compilation will fail if it is not provided. Before this commit it was failing with a cryptic error message (bumped into it again today...). Now we've got a clear error message without any functional change.

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

Successfully merging this pull request may close these issues.

2 participants