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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user