mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
Collapse identical catch blocks.
This commit is contained in:
parent
f5c475cf0b
commit
12ef4f8039
2 changed files with 6 additions and 18 deletions
|
@ -415,10 +415,8 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider {
|
|||
} else {
|
||||
return null;
|
||||
}
|
||||
} catch (final JSONException jsonExc) {
|
||||
} catch (final JSONException | ParseException jsonExc) {
|
||||
throw new ParserException(jsonExc);
|
||||
} catch (final ParseException parseExc) {
|
||||
throw new ParserException(parseExc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -471,10 +469,8 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider {
|
|||
|
||||
return new Stop(location, plannedArrivalTime, plannedArrivalPosition, plannedDepartureTime,
|
||||
plannedDeparturePosition);
|
||||
} catch (final JSONException jsonExc) {
|
||||
} catch (final JSONException | ParseException jsonExc) {
|
||||
throw new ParserException(jsonExc);
|
||||
} catch (final ParseException parseExc) {
|
||||
throw new ParserException(parseExc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -829,10 +825,8 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider {
|
|||
}
|
||||
|
||||
return result;
|
||||
} catch (final JSONException jsonExc) {
|
||||
} catch (final JSONException | ParseException jsonExc) {
|
||||
throw new ParserException(jsonExc);
|
||||
} catch (final ParseException parseExc) {
|
||||
throw new ParserException(parseExc);
|
||||
} catch (final NotFoundException fnfExc) {
|
||||
try {
|
||||
final JSONObject head = new JSONObject(fnfExc.getBodyPeek().toString());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue