diff --git a/src/main/java/de/stklcode/pubtrans/ura/UraClient.java b/src/main/java/de/stklcode/pubtrans/ura/UraClient.java index 2700799..eb12944 100644 --- a/src/main/java/de/stklcode/pubtrans/ura/UraClient.java +++ b/src/main/java/de/stklcode/pubtrans/ura/UraClient.java @@ -260,7 +260,7 @@ public class UraClient implements Serializable { line = br.readLine(); } } catch (IOException e) { - throw new IllegalStateException("Failed to read from API", e); + throw new IllegalStateException("Failed to read trips from API", e); } return trips; } @@ -330,7 +330,7 @@ public class UraClient implements Serializable { } } } catch (IOException e) { - throw new IllegalStateException("Failed to read from API", e); + throw new IllegalStateException("Failed to read stops from API", e); } return stops; } @@ -385,7 +385,7 @@ public class UraClient implements Serializable { line = br.readLine(); } } catch (IOException e) { - throw new IllegalStateException("Failed to read from API", e); + throw new IllegalStateException("Failed to read messages from API", e); } return messages; } diff --git a/src/main/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReader.java b/src/main/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReader.java index c808876..e5705f2 100644 --- a/src/main/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReader.java +++ b/src/main/java/de/stklcode/pubtrans/ura/reader/AsyncUraTripReader.java @@ -134,7 +134,7 @@ public class AsyncUraTripReader implements AutoCloseable { } catch (InterruptedException e) { Thread.currentThread().interrupt(); } catch (ExecutionException e) { - throw new IllegalStateException("Failed to read from API", e); + throw new IllegalStateException("Failed to close API connection", e); } catch (TimeoutException e) { // Task failed to finish within 1 second. future.cancel(true);