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;
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);
// 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);