Hafas: Handle h2g errors 9280 and 9300.

This commit is contained in:
Andreas Schildbach 2015-07-03 10:12:16 +02:00
parent f12c9db7e9
commit 07a0b8b535

View file

@ -2055,8 +2055,14 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
// or with the selected means of transport on the required date/time. // or with the selected means of transport on the required date/time.
return new QueryTripsResult(header, QueryTripsResult.Status.NO_TRIPS); return new QueryTripsResult(header, QueryTripsResult.Status.NO_TRIPS);
else if (errorCode == 9260) else if (errorCode == 9260)
// Unknown departure station // H9260: Unknown departure station
return new QueryTripsResult(header, QueryTripsResult.Status.UNKNOWN_FROM); return new QueryTripsResult(header, QueryTripsResult.Status.UNKNOWN_FROM);
else if (errorCode == 9280)
// H9280: Unknown intermediate station
return new QueryTripsResult(header, QueryTripsResult.Status.UNKNOWN_VIA);
else if (errorCode == 9300)
// H9300: Unknown arrival station
return new QueryTripsResult(header, QueryTripsResult.Status.UNKNOWN_TO);
else if (errorCode == 9320) else if (errorCode == 9320)
// The input is incorrect or incomplete // The input is incorrect or incomplete
return new QueryTripsResult(header, QueryTripsResult.Status.INVALID_DATE); return new QueryTripsResult(header, QueryTripsResult.Status.INVALID_DATE);