Authored by jack

增加异常捕获范围

@@ -62,10 +62,12 @@ public class TwemproxyTask extends Task { @@ -62,10 +62,12 @@ public class TwemproxyTask extends Task {
62 62
63 twemproxyInfo = new TwemproxyInfo(this.getIp(), this.getPort(), info); 63 twemproxyInfo = new TwemproxyInfo(this.getIp(), this.getPort(), info);
64 64
65 - } catch (IOException e) { 65 + } catch (Exception e) {
66 66
67 this.getAlarmMsgService().sendSms("Twemproxy", "Failed to query Twemproxy " + this.getUrl() + " monitor info.", this.getSnsMobileConfig().getBaseMobile()); 67 this.getAlarmMsgService().sendSms("Twemproxy", "Failed to query Twemproxy " + this.getUrl() + " monitor info.", this.getSnsMobileConfig().getBaseMobile());
68 68
  69 + DEBUG.error("Failed to query twemproxy {} info ... error {}", this.getUrl(), e);
  70 +
69 return; 71 return;
70 } 72 }
71 73
@@ -138,7 +140,7 @@ public class TwemproxyTask extends Task { @@ -138,7 +140,7 @@ public class TwemproxyTask extends Task {
138 140
139 for (Map.Entry<String, Long> entry : twemproxyInfo.getRequestMap().entrySet()) { 141 for (Map.Entry<String, Long> entry : twemproxyInfo.getRequestMap().entrySet()) {
140 142
141 - taskService.submit(new RedisTask(entry.getKey(), entry.getValue(),this.getUrl(), this.getAlarmMsgService(), this.getSnsMobileConfig())); 143 + taskService.submit(new RedisTask(entry.getKey(), entry.getValue(), this.getUrl(), this.getAlarmMsgService(), this.getSnsMobileConfig()));
142 } 144 }
143 145
144 taskService.shutdown(); 146 taskService.shutdown();