Class NoStagesGivenException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
yams.core.exceptions.NoStagesGivenException
- All Implemented Interfaces:
Serializable
Thrown by
GearBox, Sprocket, and
SmartMath when a gear reduction calculation is requested but no gear stages were
supplied.
At least one reduction stage (in the "IN:OUT" string format) is required for the ratio
calculation to be mathematically valid. Passing an empty stage array or constructing a
GearBox/Sprocket with zero stages triggers this exception.
Resolution: Provide one or more reduction stages. Each stage must be a String
in the form "driverTeeth:drivenTeeth" (e.g., "12:60").
Example correct usage:
// Single-stage 5:1 reduction
GearBox gearBox = new GearBox("12:60");
// Two-stage reduction
GearBox gearBox = new GearBox("12:60", "18:36");
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs exception for failure to provide stages. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NoStagesGivenException
public NoStagesGivenException()Constructs exception for failure to provide stages.
-