parse invalid date error

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@743 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2011-08-16 14:03:22 +00:00
parent ba155714e1
commit 1755a530e0
2 changed files with 13 additions and 0 deletions

View file

@ -700,6 +700,8 @@ public abstract class AbstractHafasProvider implements NetworkProvider
if (XmlPullUtil.test(pp, "Err"))
{
final String code = XmlPullUtil.attr(pp, "code");
if (code.equals("I3")) // Input: date outside of the timetable period
return new QueryConnectionsResult(Status.INVALID_DATE);
if (code.equals("F1")) // Spool: Error reading the spoolfile
return new QueryConnectionsResult(Status.SERVICE_DOWN);
throw new IllegalStateException("error " + code + " " + XmlPullUtil.attr(pp, "text"));