Make AbstractSessionNegotiator react to exceptions
[controller.git] / opendaylight / commons / protocol-framework / src / main / java / org / opendaylight / protocol / framework / AbstractSessionNegotiator.java
index 5555fda7d5a25f98574c5bbe01dd1e7df95497c8..9f9f811e889f85c20352db331187f008b812bd85 100644 (file)
@@ -67,8 +67,14 @@ public abstract class AbstractSessionNegotiator<M, S extends AbstractProtocolSes
         try {
             handleMessage((M)msg);
         } catch (Exception e) {
-            logger.debug("Unexpected exception during negotiation", e);
+            logger.debug("Unexpected error while handling negotiation message {}", msg, e);
             negotiationFailed(e);
         }
     }
+
+    @Override
+    public void exceptionCaught(final ChannelHandlerContext ctx, final Throwable cause) {
+        logger.info("Unexpected error during negotiation", cause);
+        negotiationFailed(cause);
+    }
 }