Catch exceptions when error rendering templates
This commit is contained in:
1 parent
5c63862054
commit
b1bf6a609e
3 files changed
+28
-5
No files matched your search
@@ -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