Errors & Exceptions¶
Custom exceptions for :mod:pypia_ctl.
Purpose
Provide precise, typed exceptions instead of RuntimeError, so callers can
distinguish missing executables, timeouts, or generic invocation failures.
Design
- Small inheritance tree with a single public base class.
- No external dependencies; used across core runners and connect logic.
Classes:
| Name | Description |
|---|---|
PiaCtlError |
Base for all pypia_ctl errors. |
PiaCtlNotFound |
|
PiaCtlInvocationFailed |
|
PiaConnectTimeout |
Connection did not reach |
Examples:
:: >>> try: ... raise PiaCtlNotFound("not on PATH") ... except PiaCtlError as e: ... isinstance(e, PiaCtlNotFound) True
PiaConnectTimeout
¶
Bases: PiaCtlError
Did not reach Connected within the polling window.
PiaCtlError
¶
Bases: Exception
Base error for :mod:pypia_ctl operations.
PiaCtlInvocationFailed
¶
Bases: PiaCtlError
piactl returned non-zero or the subprocess/timeout failed.
PiaCtlNotFound
¶
Bases: PiaCtlError
piactl executable not found on PATH.