MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / _handle_error

Function _handle_error

unity_cli/cli/helpers.py:27–30  ·  view source on GitHub ↗

Print error and raise typer.Exit with the mapped exit code.

(e: UnityCLIError)

Source from the content-addressed store, hash-verified

25
26
27def _handle_error(e: UnityCLIError) -> None:
28 """Print error and raise typer.Exit with the mapped exit code."""
29 print_error(e.message, e.code)
30 raise typer.Exit(exit_code_for(e)) from None
31
32
33def handle_cli_errors(fn: Callable[..., None]) -> Callable[..., None]:

Callers 15

editor_installFunction · 0.90
recorder_startFunction · 0.90
recorder_stopFunction · 0.90
recorder_statusFunction · 0.90
uitree_dumpFunction · 0.90
uitree_queryFunction · 0.90
uitree_inspectFunction · 0.90
uitree_clickFunction · 0.90
uitree_scrollFunction · 0.90
uitree_textFunction · 0.90
tests_runFunction · 0.90
tests_listFunction · 0.90

Calls 3

print_errorFunction · 0.90
exit_code_forFunction · 0.90
ExitMethod · 0.80

Tested by 3

tests_runFunction · 0.72
tests_listFunction · 0.72
tests_statusFunction · 0.72