-
Notifications
You must be signed in to change notification settings - Fork 645
Description
I'm new to Nunjucks so please forgive me but I'm finding it very hard to debug when things start going wrong as errors don't seem to propagate up.
Whether it's a syntax error in the template, or a missing template, no errors are raised and and null is returned from the template.render(context)
method.
My render pipeline is sync, the only way I've been able to get it to report the error though is to provide an error-first callback to the render
method, get the error, then remember to remove the callback after. This is quite frustrating.
I've also tried setting the throwOnUndefined
option to true
but that doesn't seem to make a difference.
Can anyone shed a light on this? I can provide some example code if needed.
While this is proving to be painful from a dev point of view, my bigger concern is that errors are swallowed in production.
Many thanks
Dave