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

Provide better error response when template parsing fails #2

Closed
ThaNarie opened this issue Jan 10, 2022 · 0 comments · Fixed by #3
Closed

Provide better error response when template parsing fails #2

ThaNarie opened this issue Jan 10, 2022 · 0 comments · Fixed by #3
Assignees

Comments

@ThaNarie
Copy link
Contributor

Currently, when you mess up something in your HTML, you could get an error similar to this:

TypeError: (intermediate value)(intermediate value).push is not a function

In this case, it was caused by a missing > in the opening <div;

html`<div
  <span data-foo="${'test'}">test</span>
</div>`,

The error you get, is not very helpful.

This is a known issue (developit/htm#188), but there isn't a solution yet – either a better error response, or auto-fix that error.

For now, we could wrap our html export that adds a try/catch and tries to do at least some error reporting.

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 a pull request may close this issue.

1 participant