StatusError

exception StatusError(message, status)

Runtime error carrying the original TCIM status and numeric code.

This is a subclass of RuntimeError, so legacy code using except RuntimeError continues to catch runtime status failures. When the caught object is a StatusError, use status or code to get the original TCIM error. A plain RuntimeError has no reliable status; convert it explicitly with from_runtime_error() when the status is known.

Methods

from_runtime_error

Convert a legacy RuntimeError into a status-aware exception.

with_cause

Attach the original exception and return this error for chaining.