Sho SHIMIZU
Committed by Gerrit Code Review

Catch Exceptions, not Throwable to remove blockers found in SonarQube

Change-Id: I49ab731ce0c9950b55063e2afa4ce9226a7b6b4a
...@@ -400,7 +400,7 @@ public class FlowRuleManager ...@@ -400,7 +400,7 @@ public class FlowRuleManager
400 extraneousFlow(rule); 400 extraneousFlow(rule);
401 } 401 }
402 } 402 }
403 - } catch (Throwable e) { 403 + } catch (Exception e) {
404 log.debug("Can't process added or extra rule {}", e.getMessage()); 404 log.debug("Can't process added or extra rule {}", e.getMessage());
405 continue; 405 continue;
406 } 406 }
...@@ -409,7 +409,7 @@ public class FlowRuleManager ...@@ -409,7 +409,7 @@ public class FlowRuleManager
409 try { 409 try {
410 // there are rules in the store that aren't on the switch 410 // there are rules in the store that aren't on the switch
411 flowMissing(rule); 411 flowMissing(rule);
412 - } catch (Throwable e) { 412 + } catch (Exception e) {
413 log.debug("Can't add missing flow rule {}", e.getMessage()); 413 log.debug("Can't add missing flow rule {}", e.getMessage());
414 continue; 414 continue;
415 } 415 }
......
...@@ -102,8 +102,8 @@ public class NettyMessagingManager implements MessagingService { ...@@ -102,8 +102,8 @@ public class NettyMessagingManager implements MessagingService {
102 serverChannelClass = EpollServerSocketChannel.class; 102 serverChannelClass = EpollServerSocketChannel.class;
103 clientChannelClass = EpollSocketChannel.class; 103 clientChannelClass = EpollSocketChannel.class;
104 return; 104 return;
105 - } catch (Throwable t) { 105 + } catch (Exception e) {
106 - log.warn("Failed to initialize native (epoll) transport. Reason: {}. Proceeding with nio.", t.getMessage()); 106 + log.warn("Failed to initialize native (epoll) transport. Reason: {}. Proceeding with nio.", e.getMessage());
107 } 107 }
108 clientGroup = new NioEventLoopGroup(); 108 clientGroup = new NioEventLoopGroup();
109 serverGroup = new NioEventLoopGroup(); 109 serverGroup = new NioEventLoopGroup();
......
...@@ -103,7 +103,7 @@ public abstract class SelectorLoop implements Runnable { ...@@ -103,7 +103,7 @@ public abstract class SelectorLoop implements Runnable {
103 state = State.STARTING; 103 state = State.STARTING;
104 try { 104 try {
105 loop(); 105 loop();
106 - } catch (Throwable e) { 106 + } catch (Exception e) {
107 error = e; 107 error = e;
108 log.error("Loop aborted", e); 108 log.error("Loop aborted", e);
109 } 109 }
......