diff --git a/src/main/java/app/services/io/readers/GeoIP.java b/src/main/java/app/services/io/readers/GeoIP.java index 7b92ca9..1568f16 100644 --- a/src/main/java/app/services/io/readers/GeoIP.java +++ b/src/main/java/app/services/io/readers/GeoIP.java @@ -29,15 +29,15 @@ public class GeoIP extends BaseReader { public String GetCountry(String ip) { try { return databaseReader.country(InetAddress.getByName(ip)).getCountry().getName(); - } catch (GeoIp2Exception | IOException e) { + } catch (Exception e) { return "Unknown"; } } public String GetCity(String ip) { try { - return databaseReader.city(InetAddress.getByName(ip)).getCountry().getName(); - } catch (GeoIp2Exception | IOException e) { + return databaseReader.city(InetAddress.getByName(ip)).getCity().getName(); + } catch (Exception e) { return "Unknown"; } }