Skip to content

More precise error message for undefined template variables #60

@SimonDreher

Description

@SimonDreher

Is your feature request related to a problem? Please describe.
If I reference an undeclared variable in my template, the error message is like template 'example.filef' uses variables with undefined value on line 36 (line number is based on the rendered output and might not be accurate).

The line number is partially helpful, since it is only roughly in that line in the source file.

Describe the solution you'd like
In many cases it would help me if the variable that is missing would be mentioned.

For example the error message could look like template 'example.filef' uses variable '.Inventory.foo.bar' with undefined value on line 36 (line number is based on the rendered output and might not be accurate)

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions