Merge "Fix channelInactive event handling in the netty pipeline for netconf."
[controller.git] / opendaylight / netconf / netconf-netty-util / src / main / java / org / opendaylight / controller / netconf / nettyutil / AbstractNetconfSession.java
index 4eaeee9d78bf09c9dc8ef554de7745bf427d453a..fd11ce8c51875e379976917fd722ce6c5797d0ec 100644 (file)
@@ -19,7 +19,6 @@ import org.opendaylight.controller.netconf.api.NetconfTerminationReason;
 import org.opendaylight.controller.netconf.nettyutil.handler.NetconfEXICodec;
 import org.opendaylight.controller.netconf.nettyutil.handler.exi.EXIParameters;
 import org.opendaylight.controller.netconf.util.xml.XmlElement;
-import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.opendaylight.protocol.framework.AbstractProtocolSession;
 import org.openexi.proc.common.EXIOptionsException;
 import org.slf4j.Logger;
@@ -88,6 +87,7 @@ public abstract class AbstractNetconfSession<S extends NetconfSession, L extends
     public String toString() {
         final StringBuffer sb = new StringBuffer(getClass().getSimpleName() + "{");
         sb.append("sessionId=").append(sessionId);
+        sb.append(", channel=").append(channel);
         sb.append('}');
         return sb.toString();
     }
@@ -114,8 +114,8 @@ public abstract class AbstractNetconfSession<S extends NetconfSession, L extends
         try {
             exiParams = EXIParameters.fromXmlElement(XmlElement.fromDomDocument(startExiMessage.getDocument()));
         } catch (final EXIOptionsException e) {
-            LOG.warn("Unable to parse EXI parameters from {} om session {}", XmlUtil.toString(startExiMessage.getDocument()), this, e);
-            throw new IllegalArgumentException(e);
+            LOG.warn("Unable to parse EXI parameters from {} on session {}", startExiMessage, this, e);
+            throw new IllegalArgumentException("Cannot parse options", e);
         }
         final NetconfEXICodec exiCodec = new NetconfEXICodec(exiParams.getOptions());
         addExiHandlers(exiCodec);