MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / cli_error

Function cli_error

src/cli_core/exit.py:14–19  ·  view source on GitHub ↗

Write ``msg`` to stderr (if provided) and exit with ``code`` (default 1).

(msg: str | None = None, code: int = 1)

Source from the content-addressed store, hash-verified

12
13
14def cli_error(msg: str | None = None, code: int = 1) -> NoReturn:
15 """Write ``msg`` to stderr (if provided) and exit with ``code`` (default 1)."""
16
17 if msg:
18 print(msg, file=sys.stderr)
19 sys.exit(code)
20
21
22def cli_ok(msg: str | None = None) -> NoReturn:

Callers 4

_run_print_modeFunction · 0.90
run_headlessFunction · 0.90

Calls 1

exitMethod · 0.45