mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
error message for 'invalid date'
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@158 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
33494f42c4
commit
1855b76d9a
6 changed files with 26 additions and 13 deletions
|
@ -241,7 +241,7 @@ public final class VbbProvider implements NetworkProvider
|
|||
private static final Pattern P_CHECK_FROM = Pattern.compile("Von:");
|
||||
private static final Pattern P_CHECK_TO = Pattern.compile("Nach:");
|
||||
private static final Pattern P_CHECK_CONNECTIONS_ERROR = Pattern
|
||||
.compile("(zu dicht beieinander|mehrfach vorhanden oder identisch)|(keine Verbindung gefunden)");
|
||||
.compile("(zu dicht beieinander|mehrfach vorhanden oder identisch)|(keine Verbindung gefunden)|(derzeit nur Auskünfte vom)");
|
||||
|
||||
public QueryConnectionsResult queryConnections(final LocationType fromType, final String from, final LocationType viaType, final String via,
|
||||
final LocationType toType, final String to, final Date date, final boolean dep, final WalkSpeed walkSpeed) throws IOException
|
||||
|
@ -256,6 +256,8 @@ public final class VbbProvider implements NetworkProvider
|
|||
return QueryConnectionsResult.TOO_CLOSE;
|
||||
if (mError.group(2) != null)
|
||||
return QueryConnectionsResult.NO_CONNECTIONS;
|
||||
if (mError.group(3) != null)
|
||||
return QueryConnectionsResult.INVALID_DATE;
|
||||
}
|
||||
|
||||
final Matcher mAddress = P_CHECK_ADDRESS.matcher(page);
|
||||
|
@ -454,7 +456,8 @@ public final class VbbProvider implements NetworkProvider
|
|||
{
|
||||
final int arrivalId = mDetFine.group(12) != null ? Integer.parseInt(mDetFine.group(12)) : 0;
|
||||
|
||||
final String arrival = ParserUtils.resolveEntities(ParserUtils.selectNotNull(mDetFine.group(13), mDetFine.group(16), mDetFine.group(17)));
|
||||
final String arrival = ParserUtils.resolveEntities(ParserUtils.selectNotNull(mDetFine.group(13), mDetFine.group(16), mDetFine
|
||||
.group(17)));
|
||||
|
||||
final double arrivalLon = mDetFine.group(14) != null ? latLonToDouble(Integer.parseInt(mDetFine.group(14))) : 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue