Exceptions
Namespace: yams::exceptions
Header: #include <yams/exceptions.hpp>
Java equivalent: Java Exceptions
Doxygen: yams::exceptions
All YAMS C++ exceptions extend yams::exceptions::YamsException, which extends std::runtime_error.
Base exception
class YamsException : public std::runtime_error {
public:
explicit YamsException(const std::string& message);
};Exception classes
ArmConfigurationException
Required ArmConfig fields are missing or invalid
ElevatorConfigurationException
Required ElevatorConfig fields are missing or invalid
PivotConfigurationException
Required PivotConfig fields are missing or invalid
SwerveDriveConfigurationException
Required swerve drive config fields are missing or invalid
SmartMotorControllerConfigurationException
SmartMotorControllerConfig is invalid
NoStagesGivenException
GearBox or Sprocket constructed with an empty stage list
InvalidStageGivenException
A stage string is not in "IN:OUT" format
Constructor patterns
Configuration exceptions
Most configuration exceptions follow this three-argument pattern:
issue
Description of the invalid or missing configuration
result
The runtime consequence of the misconfiguration
fix
Suggested corrective action
SwerveDriveConfigurationException
Takes a single message string rather than the three-argument pattern.
Gearing exceptions
Example
Last updated
Was this helpful?
