Skip to content

Add CliError, a command error that exits cleanly under a CLI run - #928

Merged
jph00 merged 1 commit into
mainfrom
pr/add-clierror-a-command-error-that-exits-cleanly
Sep 2, 2026
Merged

Add CliError, a command error that exits cleanly under a CLI run#928
jph00 merged 1 commit into
mainfrom
pr/add-clierror-a-command-error-that-exits-cleanly

Conversation

@jph00

@jph00 jph00 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

A call_parse function that cannot continue raises CliError with a message for the user. Under a CLI run the message goes to stderr and the process exits with status 1, without a traceback. From Python the exception propagates like any other, so library code no longer needs raise SystemExit, which asyncio treats as fatal when it escapes a task. See the call_parse section of the script notebook, after is_cli.

@jph00 jph00 added the enhancement New feature or request label Sep 2, 2026
@jph00
jph00 merged commit b7007fc into main Sep 2, 2026
@jph00
jph00 deleted the pr/add-clierror-a-command-error-that-exits-cleanly branch September 2, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant