VRS: Throw exception on unhandled segment type.

This commit is contained in:
Andreas Schildbach 2015-09-12 16:52:33 +02:00
parent e772bce41e
commit cc55fb4725

View file

@ -942,6 +942,10 @@ public class VrsProvider extends AbstractNetworkProvider
arrivalPredicted, segmentDestinationPosition, segmentDestinationPosition), intermediateStops, points, Strings arrivalPredicted, segmentDestinationPosition, segmentDestinationPosition), intermediateStops, points, Strings
.emptyToNull(message.toString()))); .emptyToNull(message.toString())));
} }
else
{
throw new IllegalStateException("unhandled type: " + type);
}
} }
int changes = route.getInt("changes"); int changes = route.getInt("changes");
List<Fare> fares = parseFare(route.optJSONObject("costs")); List<Fare> fares = parseFare(route.optJSONObject("costs"));