Errors¶
AlloyAPIError ¶
Base class: message (what went wrong), fix (what to change), field (the argument or card field).
Example: AlloyAPIError("mass must be > 0", "pass mass=1.0 (kg)", field="mass").to_dict().
to_dict ¶
to_dict() -> dict[str, Any]
JSON-ready form. Example: {"error": "SceneError", "message": ..., "fix": ..., "field": "size"}.
SceneError ¶
A scene description is invalid (bad argument, unknown material, clashing name). Example: a negative size.
BuildError ¶
The engine could not build the scene (routing, assembly, capacity, install). Example: an unknown device.
SimulationError ¶
Stepping failed or a world became invalid (non-finite, deep penetration). Example: sim.step() on INVALID.
UnknownNameError ¶
A body, joint or object name is not in the scene; the message lists the names that are.
Example: sim.state()["cub.pos"] -> use sim.names() to see the names.
FeatureUnavailableError ¶
A feature this install does not have yet (for example cameras before alloy.camera is installed).