Exceptions
PowerEventsError ¶
Bases: Exception
Base class for exceptions of power_events.
ValueAbsentError ¶
ValueAbsentError(path: str, missing_key: str, event: Mapping[Any, Any])
NoPredicateError ¶
NoPredicateError(path: str)
Bases: PowerEventsError
Exception raised when no predicate has been set for a value condition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path of the value condition. |
required |
RouteError ¶
Bases: PowerEventsError
Base class for exceptions related to routing errors.
NoRouteFoundError ¶
NoRouteFoundError(event: Mapping[Any, Any], routes: list[str])
Bases: RouteError
Exception raised when no route is found for an event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
|
Mapping[Any, Any]
|
The event that caused the error. |
required |
routes
|
list[str]
|
The list of registered route functions. |
required |
MultipleRoutesError ¶
MultipleRoutesError(event: Mapping[Any, Any], routes: list[str])
Bases: RouteError
Exception raised when multiple routes are found for an event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
|
Mapping[Any, Any]
|
The event that caused the error. |
required |
routes
|
list[str]
|
The list of available route functions. |
required |