handlebars.scala icon indicating copy to clipboard operation
handlebars.scala copied to clipboard

Way to access visitor errors

Open olivierdeckers opened this issue 9 years ago • 1 comments

In the current implementation, errors are logged using slf4j. For example, if a value cannot be found in the context, it is just omitted from the result. I would like to obtain a list of the values that could not be found.

What would be the best way to implement this in your opinion?

olivierdeckers avatar Nov 24 '16 17:11 olivierdeckers

I added this feature, and created a pull request: #71 I ended up implementing it by adding an optional field to the visitor. If it is defined, errors will be accumulated in it. If it is not defined, nothing will happen. The change should be backwards compatible since I introduced a separate renderStrict method

olivierdeckers avatar Nov 25 '16 16:11 olivierdeckers