Errors
provide.foundation.cli.errors
¶
CLI adapter error classes.
Foundation-based errors for CLI adapter system.
Classes¶
CLIAdapterNotFoundError
¶
Bases: CLIError
Raised when CLI adapter dependencies are missing.
This error occurs when attempting to use a CLI framework adapter but the required framework package is not installed.
Examples:
Initialize with framework details.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
framework
|
str
|
Name of the CLI framework (e.g., 'click') |
required |
package
|
str | None
|
Optional package name to install |
None
|
Source code in provide/foundation/cli/errors.py
Functions¶
CLIBuildError
¶
CLIBuildError(
message: str,
*,
code: str | None = None,
context: dict[str, Any] | None = None,
cause: Exception | None = None,
**extra_context: Any
)
Bases: CLIError
Raised when CLI command/group building fails.
This error occurs during the conversion of framework-agnostic CommandInfo to framework-specific CLI objects.
Source code in provide/foundation/errors/base.py
CLIError
¶
CLIError(
message: str,
*,
code: str | None = None,
context: dict[str, Any] | None = None,
cause: Exception | None = None,
**extra_context: Any
)
Bases: FoundationError
Base error for CLI adapter operations.
Raised when CLI adapter operations fail.
Source code in provide/foundation/errors/base.py
InvalidCLIHintError
¶
Bases: CLIError
Raised when an invalid CLI hint is provided in Annotated.
This error occurs when a parameter uses typing.Annotated with an invalid CLI rendering hint. Valid hints are 'option' and 'argument'.
Examples:
Initialize with hint and parameter details.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hint
|
str
|
The invalid hint that was provided |
required |
param_name
|
str
|
Name of the parameter with invalid hint |
required |