feat: weatherCachedData didn't throw exception on unknown city

This commit is contained in:
Nemo D'ACREMONT 2024-12-16 20:56:37 +01:00
parent 4fc4374583
commit 79a3e1941a
2 changed files with 2 additions and 4 deletions

View File

@ -28,7 +28,7 @@ import eirb.pg203.weather.data.WeatherData.Condition;
public class OpenWeatherMap extends WeatherCachedAPI {
private static final String forecastBaseURL = "https://api.openweathermap.org/data/2.5/forecast";
private String APIKey;
private static Clock clock = Clock.systemUTC();
public static Clock clock = Clock.systemUTC();
JSONFetcher JSONFetcher = new JSONFetcher();
public OpenWeatherMap(String APIKey) {

View File

@ -39,9 +39,7 @@ public abstract class WeatherCachedAPI implements WeatherDataAPI {
{
if (this.cache.needsUpdate(cityName, i))
{
try {
updateCache(days, cityName);
} catch(Exception e) {}
updateCache(days, cityName);
}
}