修复断网时出现获取地点错误Bug,改成友好提示。

master
yangzhengze 2018-05-30 12:37:52 +08:00
parent 41c8576479
commit 91ea8bffa7
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,8 @@ public class AddressUtils {
reader.close();
return buffer.toString();
} catch (IOException e) {
e.printStackTrace();
System.out.println("温馨提醒:您的主机已经断网,请您检查主机的网络连接");
System.out.println("根据IP获取所在位置----------错误消息:"+e.getMessage());
} finally {
if (connection != null) {
connection.disconnect();