-
Notifications
You must be signed in to change notification settings - Fork 59
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
Implement error modes #8
Labels
Comments
jamesog
added a commit
to jamesog/liquid
that referenced
this issue
Oct 29, 2022
The Ruby implementation has support for erroring when a template has an undefined variable. This is implemented by passing an option to the render() method. As this version doesn't expose render.Config in the engine, a StrictVariables() method is provided on the engine to enable it. This differs from the Ruby version in that it's on for the entire engine, rather than enabled for each call to Render(). This is more similar to the Ruby version's render!() method as it immediately errors, rather than storing a stack of errors which can be accessed later. Refs. osteele#8
jamesog
added a commit
to jamesog/liquid
that referenced
this issue
Oct 29, 2022
The Ruby implementation has support for erroring when a template has an undefined variable. This is implemented by passing an option to the render() method. As this version doesn't expose render.Config in the engine, a StrictVariables() method is provided on the engine to enable it. This differs from the Ruby version in that it's on for the entire engine, rather than enabled for each call to Render(). This is more similar to the Ruby version's render!() method as it immediately errors, rather than storing a stack of errors which can be accessed later. Refs. osteele#8
jamesog
added a commit
to jamesog/liquid
that referenced
this issue
Oct 29, 2022
The Ruby implementation has support for erroring when a template has an undefined variable. This is implemented by passing an option to the render() method. As this version doesn't expose render.Config in the engine, a StrictVariables() method is provided on the engine to enable it. This differs from the Ruby version in that it's on for the entire engine, rather than enabled for each call to Render(). This is more similar to the Ruby version's render!() method as it immediately errors, rather than storing a stack of errors which can be accessed later. Refs. osteele#8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add an option to warn or be silent on undefined filters (currently errors).
Add an option to warn or error on undefined variables (currently silent).
The text was updated successfully, but these errors were encountered: