summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
ee23f5c)
Catch the exception and log it with enough context.
Change-Id: I23c248c59753008e6d09155513b2dba108fbccbf
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
import org.opendaylight.controller.md.sal.dom.api.DOMNotification;
import org.opendaylight.controller.md.sal.dom.api.DOMNotificationListener;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
import org.opendaylight.controller.md.sal.dom.api.DOMNotification;
import org.opendaylight.controller.md.sal.dom.api.DOMNotificationListener;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* A single notification event in the disruptor ringbuffer. These objects are reused,
* so they do have mutable state.
*/
final class DOMNotificationRouterEvent {
/**
* A single notification event in the disruptor ringbuffer. These objects are reused,
* so they do have mutable state.
*/
final class DOMNotificationRouterEvent {
+ private static final Logger LOG = LoggerFactory.getLogger(DOMNotificationRouterEvent.class);
public static final EventFactory<DOMNotificationRouterEvent> FACTORY = new EventFactory<DOMNotificationRouterEvent>() {
@Override
public DOMNotificationRouterEvent newInstance() {
public static final EventFactory<DOMNotificationRouterEvent> FACTORY = new EventFactory<DOMNotificationRouterEvent>() {
@Override
public DOMNotificationRouterEvent newInstance() {
void deliverNotification() {
for (ListenerRegistration<? extends DOMNotificationListener> r : subscribers) {
void deliverNotification() {
for (ListenerRegistration<? extends DOMNotificationListener> r : subscribers) {
- final DOMNotificationListener l = r.getInstance();
- if (l != null) {
- l.onNotification(notification);
+ final DOMNotificationListener listener = r.getInstance();
+ if (listener != null) {
+ try {
+ listener.onNotification(notification);
+ } catch (Exception e) {
+ LOG.error("Delivery of notification {} caused an error in listener {}", notification, listener, e);
+ }