Encapsulated errors in IllegalStateException

getList() and getStops() no longer silently ignore IOExceptions and also
do not print StackTraces any more.
This commit is contained in:
2017-08-29 18:24:44 +02:00
parent ca9578a4d3
commit 6b0481a5e1
2 changed files with 17 additions and 8 deletions

View File

@ -233,7 +233,7 @@ public class UraClient {
line = br.readLine();
}
} catch (IOException e) {
e.printStackTrace();
throw new IllegalStateException("Failed to read from API", e);
}
return trips;
}
@ -268,7 +268,7 @@ public class UraClient {
}
}
} catch (IOException e) {
e.printStackTrace();
throw new IllegalStateException("Failed to read from API", e);
}
return stops;
}