Source code for duck.html.components.core.exceptions
"""
Exception classes related to the component system.
"""
[docs]
class ComponentSystemError(Exception):
"""
Base exception for component system-related errors.
"""
pass
[docs]
class HtmlComponentError(ComponentSystemError):
"""
Exception raised for errors in the HtmlComponent.
"""
pass
[docs]
class InitializationError(HtmlComponentError):
"""
Raised upon initialization error.
"""
[docs]
class ComponentCopyError(HtmlComponentError):
"""
Raised on component copy issues.
"""
[docs]
class ComponentNotLoadedError(HtmlComponentError):
"""
Raised if component is not loaded yet it is required for component to be loaded.
"""
[docs]
class FrozenComponentError(HtmlComponentError):
"""
Raised on attempts to mutate frozen components or data.
"""
pass
[docs]
class NoRootError(HtmlComponentError):
"""
Exception raised for errors when an html component has no root component.
"""
pass
[docs]
class NoParentError(HtmlComponentError):
"""
Exception raised for errors when an html component has no parent.
"""
pass
[docs]
class RedundantUpdate(HtmlComponentError):
"""
Raised when redundant update targets conflict due to shared root.
"""
pass
[docs]
class ForceUpdateError(HtmlComponentError):
"""
Raised when there is an issue in forcily updating a component on event"""
pass
[docs]
class RedundantForceUpdate(ForceUpdateError):
"""
Raised when redundant updates on force updates
"""
pass
[docs]
class UnknownEventError(HtmlComponentError):
"""
Raised when trying to bind a component to unknown event.
"""
pass
[docs]
class EventAlreadyBound(HtmlComponentError):
"""
Raised when trying to bind a component that's already bound.
"""
pass
[docs]
class AlreadyInRegistry(HtmlComponentError):
"""
Raised when trying to add a component already in registry.
"""
pass
[docs]
class JavascriptExecutionError(HtmlComponentError):
"""
Raised when there was a failure in execution of JavaScript on client side due to
connection-failure or execution error.
"""
pass
[docs]
class JavascriptExecutionTimedOut(JavascriptExecutionError):
"""
Raised on timeout whilst executing JavaScript code on client side.
"""
pass
[docs]
class ComponentAttributeProtection(HtmlComponentError):
"""
Raised If protected component attribute is being modified.
"""