Exceptions
Package: yams.core.exceptions
Javadoc: yams.core.exceptions
YAMS throws typed RuntimeException subclasses for configuration and runtime errors. All exceptions extend RuntimeException so they are unchecked; you do not need to declare or catch them unless you want to handle configuration problems gracefully.
Most exceptions are thrown during motor controller or mechanism construction if required configuration fields are missing.
Exception classes
ArmConfigurationException
Required ArmConfig fields are missing or invalid
DifferentialMechanismConfigurationException
Required DifferentialMechanismConfig fields are missing
DoubleJointedArmConfigurationException
A joint ArmConfig is missing required fields
ElevatorConfigurationException
Required ElevatorConfig fields are missing
FlyWheelConfigurationException
Required FlyWheelConfig fields are missing
PivotConfigurationException
Required PivotConfig fields are missing
SmartMotorControllerConfigurationException
The SmartMotorControllerConfig is invalid or missing required options
SwerveDriveConfigurationException
Required SwerveDriveConfig fields are missing
MotorNotPresentException
A mechanism has no motor controller (defined, but not currently thrown by YAMS itself)
InvalidStageGivenException
A gear stage string is not in "IN:OUT" format
NoStagesGivenException
A GearBox or Sprocket was constructed with an empty stage list
Configuration exception constructors
Most configuration exceptions follow this constructor pattern:
message
Description of what is missing or invalid
result
What behavior will be broken without this configuration
remedyFunction
The builder method to call to fix the problem
The remaining exceptions take simpler arguments:
Example error handling
Last updated
Was this helpful?
