2015-08-30 01:11:24 +00:00
|
|
|
""" Exceptions used by Home Assistant """
|
|
|
|
|
2015-08-30 02:34:35 +00:00
|
|
|
|
2015-08-30 01:11:24 +00:00
|
|
|
class HomeAssistantError(Exception):
|
|
|
|
""" General Home Assistant exception occured. """
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidEntityFormatError(HomeAssistantError):
|
|
|
|
""" When an invalid formatted entity is encountered. """
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class NoEntitySpecifiedError(HomeAssistantError):
|
|
|
|
""" When no entity is specified. """
|
|
|
|
pass
|
2015-12-12 03:07:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TemplateError(HomeAssistantError):
|
|
|
|
""" Error during template rendering. """
|
|
|
|
def __init__(self, exception):
|
|
|
|
super().__init__('{}: {}'.format(exception.__class__.__name__,
|
|
|
|
exception))
|