mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-13 00:08:49 +00:00
AbstractEfaProvider: Parse error message from mobile results.
This commit is contained in:
parent
99de34026e
commit
607c3c2b91
1 changed files with 16 additions and 11 deletions
|
@ -3073,6 +3073,10 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
|
|||
|
||||
XmlPullUtil.enter(pp, "efa");
|
||||
|
||||
if (XmlPullUtil.test(pp, "error")) {
|
||||
final String message = XmlPullUtil.valueTag(pp, "error");
|
||||
throw new RuntimeException(message);
|
||||
} else {
|
||||
final String now = XmlPullUtil.valueTag(pp, "now");
|
||||
final Calendar serverTime = new GregorianCalendar(timeZone);
|
||||
ParserUtils.parseIsoDate(serverTime, now.substring(0, 10));
|
||||
|
@ -3088,6 +3092,7 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
|
|||
|
||||
return header;
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, String> processPas(final XmlPullParser pp) throws XmlPullParserException, IOException {
|
||||
final Map<String, String> params = new HashMap<>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue