Skip to main content
A robot controller reported a fault while executing a command. The form-factor-agnostic controller-fault exception. Vendor drivers subclass it (e.g. the FANUC drivers’ FanucFault) and may attach vendor attributes; callers that want fault-aware recovery catch RobotFault and branch only on recoverable, never on vendor specifics:: try: arm.followJointTrajectory(…) except RobotFault as fault: if fault.recoverable: arm.reset() # then retry else: raise # fatal — needs human intervention Severity is the universal contract: every robot can say whether a software recovery attempt is worth making. Vendor alarm codes are optional metadata — many controllers expose none, so no driver must populate them, and robot-agnostic code must treat them as opaque display strings rather than branching on their content. Carries explicit typed fields rather than being a @dataclass: it has to stay raisable and catchable by existing except RuntimeError handlers, and a dataclass-generated __init__ would not pass message through to RuntimeError (so str(fault) would lose it).

Fields

The fault description (see Args).
The recovery hint (see Args).
The vendor alarm codes, empty when none were available.

Constructor

Signature