mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-17 03:39:51 +00:00
parse 'invalid date' message
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@257 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
237c9b0397
commit
4ecc11d814
1 changed files with 12 additions and 0 deletions
|
@ -716,6 +716,18 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
|||
|
||||
if (!XmlPullUtil.jumpToStartTag(pp, null, "itdTripDateTime"))
|
||||
throw new IllegalStateException("cannot find <itdTripDateTime />");
|
||||
if (!XmlPullUtil.nextStartTagInsideTree(pp, null, "itdDateTime"))
|
||||
throw new IllegalStateException("cannot find <itdDateTime />");
|
||||
if (!XmlPullUtil.nextStartTagInsideTree(pp, null, "itdDate"))
|
||||
throw new IllegalStateException("cannot find <itdDate />");
|
||||
if (!pp.isEmptyElementTag())
|
||||
{
|
||||
if (!XmlPullUtil.nextStartTagInsideTree(pp, null, "itdMessage"))
|
||||
throw new IllegalStateException("cannot find <itdMessage />");
|
||||
final String message = pp.nextText();
|
||||
if (message.equals("invalid date"))
|
||||
return new QueryConnectionsResult(Status.INVALID_DATE);
|
||||
}
|
||||
|
||||
final Calendar departureTime = new GregorianCalendar(), arrivalTime = new GregorianCalendar();
|
||||
final List<Connection> connections = new ArrayList<Connection>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue