Catch exceptions when error rendering templates
This commit is contained in:
parent
5c63862054
commit
b1bf6a609e
3 changed files with 28 additions and 5 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue