mirror of
https://github.com/home-assistant/core
synced 2024-08-18 20:45:41 +02:00
![milanvo](/assets/img/avatar_default.png)
* Recorder exception catch for long state string
* Revert - Recorder exception catch for long state string
* Validate state length at core level
* Revert - this reverts commit 9d6bd017d9
.
* Revert - Recorder exception catch for long state string
* Fix state TypeError
* Test for long state exception
41 lines
864 B
Python
41 lines
864 B
Python
"""The exceptions used by Home Assistant."""
|
|
|
|
|
|
class HomeAssistantError(Exception):
|
|
"""General Home Assistant exception occurred."""
|
|
|
|
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):
|
|
"""Init the error."""
|
|
super().__init__('{}: {}'.format(exception.__class__.__name__,
|
|
exception))
|
|
|
|
|
|
class PlatformNotReady(HomeAssistantError):
|
|
"""Error to indicate that platform is not ready."""
|
|
|
|
pass
|
|
|
|
|
|
class InvalidStateError(HomeAssistantError):
|
|
"""When an invalid state is encountered."""
|
|
|
|
pass
|