Commit 91ea8bff by yangzhengze

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

parent 41c85764
...@@ -62,7 +62,8 @@ public class AddressUtils { ...@@ -62,7 +62,8 @@ public class AddressUtils {
reader.close(); reader.close();
return buffer.toString(); return buffer.toString();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); System.out.println("温馨提醒:您的主机已经断网,请您检查主机的网络连接");
System.out.println("根据IP获取所在位置----------错误消息:"+e.getMessage());
} finally { } finally {
if (connection != null) { if (connection != null) {
connection.disconnect(); connection.disconnect();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment