diff --git a/CHANGELOG.md b/CHANGELOG.md index db1c187..bf0a5e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ **Enhancements** - something about issue +- read/write/notification: on error debug points to the correct node and varame in debug message ### 1.1.22: Maintenance Release diff --git a/ads-connection.js b/ads-connection.js index 191150b..02ee81d 100644 --- a/ads-connection.js +++ b/ads-connection.js @@ -227,7 +227,7 @@ module.exports = function (RED) { node.notificationSubscribed[n.symname].push(n) node.adsClient.notify(handle, function(err){ if (err){ - node.error(util.format('Ads Register Notification %s', err)) + n.error(util.format("Ads Register Notification '%s' %s",n.symname, err)) } else { node.notificationSubscribed[n.symname].map((no)=>{ no.notifyHandle = handle.notifyHandle @@ -314,7 +314,7 @@ module.exports = function (RED) { node.adsClient.write(handle, function (err){ if (err) { - node.error(util.format('Ads write %s', err)) + n.error(util.format("Ads write '%s' %s", config.symname,err)) } } ) } @@ -346,7 +346,7 @@ module.exports = function (RED) { debug('read:',handle) node.adsClient.read(handle, function(err, handle){ if (err) { - node.error(util.format('Ads read %s', err)) + n.error(util.format("Ads read '%s' %s",config.symname, err)) } else { cb(handle) }