MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / raised_while_handling

Function raised_while_handling

lib/cli/tests/test_run_usage.py:579–587  ·  view source on GitHub ↗

ERROR raised, without `from`, in the handler for CONTEXT.

(error: BaseException, context: BaseException)

Source from the content-addressed store, hash-verified

577
578
579def raised_while_handling(error: BaseException, context: BaseException) -> BaseException:
580 """ERROR raised, without `from`, in the handler for CONTEXT."""
581 try:
582 try:
583 raise context
584 except BaseException:
585 raise error # noqa: B904 - what `raise SystemExit(1)` in a handler does
586 except BaseException as raised:
587 return raised
588
589
590def json_project_error(cause: BaseException | None = None) -> BaseException:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected