Bug 2517: Catch RuntimeExceptions thrown from the DCL in DataChangeListener
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / DataChangeListener.java
index 9a77e4d..6f14af3 100644 (file)
@@ -62,7 +62,11 @@ public class DataChangeListener extends AbstractUntypedActor {
 
         LOG.debug("Sending change notification {} to listener {}", change, listener);
 
-        this.listener.onDataChanged(change);
+        try {
+            this.listener.onDataChanged(change);
+        } catch (RuntimeException e) {
+            LOG.error( String.format( "Error notifying listener %s", this.listener ), e );
+        }
 
         // It seems the sender is never null but it doesn't hurt to check. If the caller passes in
         // a null sender (ActorRef.noSender()), akka translates that to the deadLetters actor.

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.