Catch Exceptions, not Throwable to remove blockers found in SonarQube

Change-Id: I49ab731ce0c9950b55063e2afa4ce9226a7b6b4a
This commit is contained in:
Sho SHIMIZU 2015-05-05 11:11:13 -07:00 committed by Gerrit Code Review
parent 3fa9e8d8d5
commit 24a00d9b0b
3 changed files with 5 additions and 5 deletions

View File

@ -400,7 +400,7 @@ public class FlowRuleManager
extraneousFlow(rule); extraneousFlow(rule);
} }
} }
} catch (Throwable e) { } catch (Exception e) {
log.debug("Can't process added or extra rule {}", e.getMessage()); log.debug("Can't process added or extra rule {}", e.getMessage());
continue; continue;
} }
@ -409,7 +409,7 @@ public class FlowRuleManager
try { try {
// there are rules in the store that aren't on the switch // there are rules in the store that aren't on the switch
flowMissing(rule); flowMissing(rule);
} catch (Throwable e) { } catch (Exception e) {
log.debug("Can't add missing flow rule {}", e.getMessage()); log.debug("Can't add missing flow rule {}", e.getMessage());
continue; continue;
} }

View File

@ -102,8 +102,8 @@ public class NettyMessagingManager implements MessagingService {
serverChannelClass = EpollServerSocketChannel.class; serverChannelClass = EpollServerSocketChannel.class;
clientChannelClass = EpollSocketChannel.class; clientChannelClass = EpollSocketChannel.class;
return; return;
} catch (Throwable t) { } catch (Exception e) {
log.warn("Failed to initialize native (epoll) transport. Reason: {}. Proceeding with nio.", t.getMessage()); log.warn("Failed to initialize native (epoll) transport. Reason: {}. Proceeding with nio.", e.getMessage());
} }
clientGroup = new NioEventLoopGroup(); clientGroup = new NioEventLoopGroup();
serverGroup = new NioEventLoopGroup(); serverGroup = new NioEventLoopGroup();

View File

@ -103,7 +103,7 @@ public abstract class SelectorLoop implements Runnable {
state = State.STARTING; state = State.STARTING;
try { try {
loop(); loop();
} catch (Throwable e) { } catch (Exception e) {
error = e; error = e;
log.error("Loop aborted", e); log.error("Loop aborted", e);
} }