Ray Milkey
Committed by Gerrit Code Review

ONOS-395 - tighten up exception handling

Change-Id: Ice3ee55adacbd890100def5d9da44c6e2a770945
...@@ -113,12 +113,12 @@ public class NettyMessagingService implements MessagingService { ...@@ -113,12 +113,12 @@ public class NettyMessagingService implements MessagingService {
113 try { 113 try {
114 localEp = new Endpoint(java.net.InetAddress.getLocalHost().getHostName(), port); 114 localEp = new Endpoint(java.net.InetAddress.getLocalHost().getHostName(), port);
115 } catch (UnknownHostException e) { 115 } catch (UnknownHostException e) {
116 - // bailing out. 116 + // Cannot resolve the local host, something is very wrong. Bailing out.
117 - throw new RuntimeException(e); 117 + throw new IllegalStateException("Cannot resolve local host", e);
118 } 118 }
119 } 119 }
120 120
121 - public void activate() throws Exception { 121 + public void activate() throws InterruptedException {
122 channels.setTestOnBorrow(true); 122 channels.setTestOnBorrow(true);
123 channels.setTestOnReturn(true); 123 channels.setTestOnReturn(true);
124 initEventLoopGroup(); 124 initEventLoopGroup();
......