List of usage examples for com.amazonaws.services.importexport.model InvalidParameterException InvalidParameterException
public InvalidParameterException(String message)
From source file:org.transitime.core.travelTimes.TravelTimesProcessor.java
License:Open Source License
/** * Number of travel time segments for the stop path specified. * //from ww w. j ava 2s . c o m * @param trip * @param stopPathIndex * @return Number of travel time segments * @throws InvalidParameterException */ private static int getNumTravelTimeSegments(Trip trip, int stopPathIndex) { StopPath stopPath = trip.getStopPath(stopPathIndex); if (stopPath == null) { String message = "In getNumTravelTimeSegments() stopPathIndex=" + stopPathIndex + " not " + "valid for trip=" + trip; logger.error(message); throw new InvalidParameterException(message); } double pathLength = stopPath.getLength(); return getNumTravelTimeSegments(pathLength); }