Process
provide.foundation.errors.process
¶
TODO: Add module docstring.
Classes¶
CommandNotFoundError
¶
CommandNotFoundError(
message: str,
*,
command: str | list[str] | None = None,
return_code: int | None = None,
stdout: str | bytes | None = None,
stderr: str | bytes | None = None,
timeout: bool = False,
code: str | None = None,
**extra_context: Any
)
Bases: ProcessError
Error when a command/executable is not found.
Source code in provide/foundation/errors/process.py
ProcessError
¶
ProcessError(
message: str,
*,
command: str | list[str] | None = None,
return_code: int | None = None,
stdout: str | bytes | None = None,
stderr: str | bytes | None = None,
timeout: bool = False,
code: str | None = None,
**extra_context: Any
)
Bases: FoundationError
Error for external process execution failures with output capture.
Initialize ProcessError with command execution details.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Human-readable error message |
required |
command
|
str | list[str] | None
|
The command that was executed |
None
|
return_code
|
int | None
|
Process return/exit code |
None
|
stdout
|
str | bytes | None
|
Standard output from the process |
None
|
stderr
|
str | bytes | None
|
Standard error from the process |
None
|
timeout
|
bool
|
Whether the process timed out |
False
|
code
|
str | None
|
Optional error code |
None
|
**extra_context
|
Any
|
Additional context information |
{}
|
Source code in provide/foundation/errors/process.py
Functions¶
ProcessTimeoutError
¶
ProcessTimeoutError(
message: str,
*,
command: str | list[str] | None = None,
timeout_seconds: float | None = None,
stdout: str | bytes | None = None,
stderr: str | bytes | None = None,
code: str | None = None,
**extra_context: Any
)
Bases: ProcessError
Error when a process times out.