Throw exception when variables are undefined in Jinja2 templates