def _fail_with_undefined_error(self, *args, **kwargs):
    try:
        return super()._fail_with_undefined_error(*args, **kwargs)
    except self._undefined_exception as ex:
        template = (template_cv.get() or '')
        _LOGGER.error("Template variable error: %s when rendering '%s'", self._undefined_message, template)
        raise ex
def _fail_with_undefined_error(self, *args, **kwargs):
    try:
        return super()._fail_with_undefined_error(*args, **kwargs)
    except self._undefined_exception as ex:
        template = (template_cv.get() or )
        _LOGGER.error("Template variable error: %s when rendering '%s'", self._undefined_message, template)
        raise ex