From 479bbfb42ba771684ecf5a92d3e92aa2a470e0bf Mon Sep 17 00:00:00 2001 From: charitha Date: Mon, 13 Aug 2018 12:03:47 +0530 Subject: [PATCH] Refactoring --- .../siddhi/device/AddNotificationFunctionProcessor.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/main/java/org/wso2/extension/siddhi/device/AddNotificationFunctionProcessor.java b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/main/java/org/wso2/extension/siddhi/device/AddNotificationFunctionProcessor.java index cc48643b89..ec9cfd3474 100644 --- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/main/java/org/wso2/extension/siddhi/device/AddNotificationFunctionProcessor.java +++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/main/java/org/wso2/extension/siddhi/device/AddNotificationFunctionProcessor.java @@ -106,7 +106,10 @@ public class AddNotificationFunctionProcessor extends StreamFunctionProcessor { try { isNotified = notificationManagementService.addNotification(new DeviceIdentifier(deviceId, deviceType), notification); } catch (NotificationManagementException e) { - log.error("Error occurred while adding notification for " + deviceType + " device with id " + deviceId, e); + // We are not throwing this exception to siddhi runtime as it will break the complete siddhi execution + // flow for the event stream coming in. + log.error("Error occurred while adding notification '" + notification.toString() + "' for " + + deviceType + " device with id " + deviceId, e); } return new Object[]{isNotified};