Suppress intermittent Date parse bug

This commit is contained in:
dkeen@dkeen-laptop 2012-07-16 08:06:57 -07:00
parent bb63de996e
commit 8bbdec5328
2 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,7 @@
package com.dougkeen.bart.networktasks;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

View File

@ -98,7 +98,13 @@ public abstract class GetRealTimeDeparturesTask extends
throw new IOException("Server returned blank xml document");
}
try {
Xml.parse(xml, handler);
} catch (Exception e) {
mException = new IOException("Server returned malformed xml: "
+ xml);
return null;
}
final RealTimeDepartures realTimeDepartures = handler
.getRealTimeDepartures();
return realTimeDepartures;
@ -121,10 +127,6 @@ public abstract class GetRealTimeDeparturesTask extends
mException = new Exception("Could not contact BART system", e);
return null;
}
} catch (SAXException e) {
mException = new Exception(
"Could not understand response from BART system: " + xml, e);
return null;
}
}