Add CoAP over Websocket interface in cloud
[platform/upstream/iotivity.git] / cloud / stack / src / main / java / org / iotivity / cloud / base / server / Server.java
index 0f920eb..3272fe8 100644 (file)
@@ -68,7 +68,7 @@ public abstract class Server {
         }
 
         @Override
-        public void initChannel(SocketChannel ch) {
+        public void initChannel(SocketChannel ch) throws Exception {
             ChannelPipeline p = ch.pipeline();
 
             if (mSslContext != null) {
@@ -112,6 +112,9 @@ public abstract class Server {
             b.childHandler(mServerInitializer);
 
             b.bind(mInetSocketAddress).sync();
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw e;
         } finally {
         }
     }