Suppress intermittent Date parse bug
This commit is contained in:
parent
bb63de996e
commit
8bbdec5328
@ -1,6 +1,7 @@
|
|||||||
package com.dougkeen.bart.networktasks;
|
package com.dougkeen.bart.networktasks;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -98,7 +98,13 @@ public abstract class GetRealTimeDeparturesTask extends
|
|||||||
throw new IOException("Server returned blank xml document");
|
throw new IOException("Server returned blank xml document");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
Xml.parse(xml, handler);
|
Xml.parse(xml, handler);
|
||||||
|
} catch (Exception e) {
|
||||||
|
mException = new IOException("Server returned malformed xml: "
|
||||||
|
+ xml);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
final RealTimeDepartures realTimeDepartures = handler
|
final RealTimeDepartures realTimeDepartures = handler
|
||||||
.getRealTimeDepartures();
|
.getRealTimeDepartures();
|
||||||
return realTimeDepartures;
|
return realTimeDepartures;
|
||||||
@ -121,10 +127,6 @@ public abstract class GetRealTimeDeparturesTask extends
|
|||||||
mException = new Exception("Could not contact BART system", e);
|
mException = new Exception("Could not contact BART system", e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} catch (SAXException e) {
|
|
||||||
mException = new Exception(
|
|
||||||
"Could not understand response from BART system: " + xml, e);
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user