Skip to content

fix(runtime): separate CommandError from InterfacyError - #9

Merged
zigai merged 1 commit into
masterfrom
feat/command-error
Oct 23, 2026
Merged

zigai merged 1 commit into
masterfrom
feat/command-error

Conversation

@zigai

@zigai zigai commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

CommandError subclassed InterfacyError, so except InterfacyError in an application also caught the application's own command failures. CommandError now subclasses Exception, and run() prints its message through a separate path instead of special-casing it inside the generic exception logger.

With full_error_traceback=True, a CommandError now prints only its message, without traceback frames. Other exceptions keep the traceback.

Verification

  • A command that raises CommandError("Settings file is stale; run setup again.") from a ValueError prints only that message and exits 1
  • A command that raises RuntimeError("secret detail") prints only RuntimeError and exits 1
  • An executable flag --diagnose that raises CommandError("Config is broken.") prints that message and exits 1
  • issubclass(CommandError, InterfacyError) is False in the installed package

@zigai
zigai force-pushed the feat/command-error branch from f02117d to 5e3f535 Compare October 23, 2026 19:48
@zigai zigai changed the title feat(runtime): print messages of CommandError fix(runtime): separate CommandError from InterfacyError Oct 23, 2026
@zigai
zigai merged commit 4b39669 into master Oct 23, 2026
2 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant