Skip to content
ocx
install

OcxProcessError, OcxTimeoutError

OcxProcessErrorclass#

Re-exported from ocx_sdk._errorsView source
class OcxProcessError(exit_code: int, argv: Sequence[str], stderr: str = '', *, attempts: int = 1, stdout: str = '')

Bases: OcxExecutionError

An ocx process exited non-zero.

Attributes

NameTypeDescription
exit_codeintThe exit status. int rather than ExitCode because a process killed by a signal exits with a code ocx never assigns, and building an error must not itself raise.
attemptsintAttempts made; greater than 1 when a retry policy was active. _retry sets it on the final failure.
stdoutstrCaptured stdout in full, verbatim. Never read by _summary() or __str__ — that is the entire point: a partial-failure report on stdout can carry data that must not reach a log through the exception message. Never redacted either, unlike stderr — substituting inside it would corrupt the JSON a caller is about to parse. Read it through partial_report(err), which is the sanctioned consumer; never hand the raw error or this attribute to a log sink, to a logger that serializes __dict__, or to a pickle crossing into a lower-trust process.

attemptsattributeinstance attribute#

attempts: int = attempts

exit_codeattributeinstance attribute#

exit_code: int = exit_code

stdoutattributeinstance attribute#

stdout: str = stdout

retryableproperty#

retryable: bool

Whether ocx called this failure transient (exit 75).

Fixed semantics, independent of any RetryPolicy: this reports what ocx said about the failure, not whether a caller chose to retry it.

OcxTimeoutErrorclass#

Re-exported from ocx_sdk._errorsView source
class OcxTimeoutError(timeout: float, argv: Sequence[str], stderr: str = '')

Bases: OcxExecutionError

ocx did not finish within the timeout and the child was terminated.

Attributes

NameTypeDescription
timeoutfloatThe per-attempt budget, in seconds, that expired.
argvtuple[str, ...]The argv that ran.
stderrstrWhatever stderr was captured before the child was killed.

timeoutattributeinstance attribute#

timeout: float = timeout