Class NoStagesGivenException

All Implemented Interfaces:
Serializable

public class NoStagesGivenException extends RuntimeException
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 Details

    • NoStagesGivenException

      public NoStagesGivenException()
      Constructs exception for failure to provide stages.