1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 22:18:40 +00:00
Files
core/homeassistant/exceptions.py
2015-12-11 19:07:03 -08:00

24 lines
617 B
Python

""" Exceptions used by Home Assistant """
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
class TemplateError(HomeAssistantError):
""" Error during template rendering. """
def __init__(self, exception):
super().__init__('{}: {}'.format(exception.__class__.__name__,
exception))