mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Catch exceptions when error rendering templates
This commit is contained in:
@@ -14,3 +14,10 @@ class InvalidEntityFormatError(HomeAssistantError):
|
||||
class NoEntitySpecifiedError(HomeAssistantError):
|
||||
""" When no entity is specified. """
|
||||
pass
|
||||
|
||||
|
||||
class TemplateError(HomeAssistantError):
|
||||
""" Error during template rendering. """
|
||||
def __init__(self, exception):
|
||||
super().__init__('{}: {}'.format(exception.__class__.__name__,
|
||||
exception))
|
||||
|
||||
Reference in New Issue
Block a user