mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-02 15:52:34 +00:00
Propagate method execution failures in Flow class
- Modify Flow class to re-raise exceptions after emitting MethodExecutionFailedEvent - Reorder MethodExecutionFailedEvent import to maintain consistent import style
This commit is contained in:
@@ -856,6 +856,7 @@ class Flow(Generic[T], metaclass=FlowMeta):
|
|||||||
error=e,
|
error=e,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
raise e
|
||||||
|
|
||||||
async def _execute_listeners(self, trigger_method: str, result: Any) -> None:
|
async def _execute_listeners(self, trigger_method: str, result: Any) -> None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ from .crew_events import (
|
|||||||
from .flow_events import (
|
from .flow_events import (
|
||||||
FlowFinishedEvent,
|
FlowFinishedEvent,
|
||||||
FlowStartedEvent,
|
FlowStartedEvent,
|
||||||
|
MethodExecutionFailedEvent,
|
||||||
MethodExecutionFinishedEvent,
|
MethodExecutionFinishedEvent,
|
||||||
MethodExecutionStartedEvent,
|
MethodExecutionStartedEvent,
|
||||||
MethodExecutionFailedEvent,
|
|
||||||
)
|
)
|
||||||
from .task_events import (
|
from .task_events import (
|
||||||
TaskCompletedEvent,
|
TaskCompletedEvent,
|
||||||
|
|||||||
Reference in New Issue
Block a user