We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When a runtime error occurs with Rhai, we almost always get the same largely uninformative error:
For example, say we have this content/borken.md:
content/borken.md
title = "Example of broken page" template = "borken" # <-- uses borken.hbs date = "2021-12-23T17:05:19Z" ---
And this templates/borken.hbs:
templates/borken.hbs
{{ borken }} <-- invokes the `borken.rhai`
And this scripts/borken.rhai:
scripts/borken.rhai
// Note that msg is undefined, but this will parse. // So it will generate a runtime error instead of a parse error. "hello " + msg;
The result of executing the above would yield:
Rendering "/content/borken.md": Template 'borken': Error rendering "borken" line 1, col 1: Cannot convert data to Rhai dynamic
I can't figure out how to get a better error message out of the Handlebars engine.
Note that a parse error is much easier to debug, and it would be nice to have something closer to this:
Script "/scripts/borken.rhai": ParseError(ParseError(MissingToken(")", "to close the arguments list of this function call 'f'"), 5:3))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When a runtime error occurs with Rhai, we almost always get the same largely uninformative error:
For example, say we have this
content/borken.md
:And this
templates/borken.hbs
:And this
scripts/borken.rhai
:The result of executing the above would yield:
I can't figure out how to get a better error message out of the Handlebars engine.
Note that a parse error is much easier to debug, and it would be nice to have something closer to this:
The text was updated successfully, but these errors were encountered: