Bug 460 - Fix warning throughout netconf subsystem
[controller.git] / opendaylight / netconf / netconf-impl / src / main / java / org / opendaylight / controller / netconf / impl / NetconfServerSessionListener.java
index b3245fff2b812775803acf59e1c2e53aa875d77e..75be1f8fe01647beeabbcb1101bd5265c7813578 100644 (file)
@@ -9,6 +9,8 @@
 package org.opendaylight.controller.netconf.impl;
 
 
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.NetconfMessage;
 import org.opendaylight.controller.netconf.impl.osgi.NetconfOperationRouter;
@@ -26,9 +28,6 @@ import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableMap;
-
 public class NetconfServerSessionListener implements NetconfSessionListener<NetconfServerSession> {
 
     static final Logger logger = LoggerFactory.getLogger(NetconfServerSessionListener.class);
@@ -97,8 +96,9 @@ public class NetconfServerSessionListener implements NetconfSessionListener<Netc
             // TODO: should send generic error or close session?
             logger.error("Unexpected exception", e);
             session.onIncommingRpcFail();
-            throw new RuntimeException("Unable to process incoming message " + netconfMessage, e);
+            throw new IllegalStateException("Unable to process incoming message " + netconfMessage, e);
         } catch (NetconfDocumentedException e) {
+            logger.trace("Error occured while processing mesage {}",e);
             session.onOutgoingRpcError();
             session.onIncommingRpcFail();
             SendErrorExceptionUtil.sendErrorMessage(session, e, netconfMessage);