topmark.cli.errors¶
Exceptions for TopMark CLI.
Usage
Raise these exceptions in CLI commands or processing to signal errors with standardized messages and exit codes.
Styling
Exceptions prefer the console stored on the shared typed CLI state (see show()).
If no CLI state is available, they fall back to Click's default styling.
TopmarkCliError ¶
Bases: ClickException
Base class for all TopMark CLI errors.
format_message ¶
Return the plain error message text.
Notes
- Unlike Click's default, this method does not add color.
- Colorization is applied in
show()when a project console is present.
Source code in src/topmark/cli/errors.py
show ¶
Display the error using the project console if available.
Falls back to Click's default error display when no typed CLI state is available.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
IO[Any] | None
|
Ignored when a CLI console is available; used only by Click fallback. |
None
|