Skip to content

Commit 3b230b3

Browse files
committed
read/write/notification: on error debug points to the correct node and varame in debug message
1 parent 20e363c commit 3b230b3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
**Enhancements**
44

55
- something about issue
6+
- read/write/notification: on error debug points to the correct node and varame in debug message
67

78
### 1.1.22: Maintenance Release
89

ads-connection.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ module.exports = function (RED) {
227227
node.notificationSubscribed[n.symname].push(n)
228228
node.adsClient.notify(handle, function(err){
229229
if (err){
230-
node.error(util.format('Ads Register Notification %s', err))
230+
n.error(util.format("Ads Register Notification '%s' %s",n.symname, err))
231231
} else {
232232
node.notificationSubscribed[n.symname].map((no)=>{
233233
no.notifyHandle = handle.notifyHandle
@@ -314,7 +314,7 @@ module.exports = function (RED) {
314314
node.adsClient.write(handle,
315315
function (err){
316316
if (err) {
317-
node.error(util.format('Ads write %s', err))
317+
n.error(util.format("Ads write '%s' %s", config.symname,err))
318318
}
319319
} )
320320
}
@@ -346,7 +346,7 @@ module.exports = function (RED) {
346346
debug('read:',handle)
347347
node.adsClient.read(handle, function(err, handle){
348348
if (err) {
349-
node.error(util.format('Ads read %s', err))
349+
n.error(util.format("Ads read '%s' %s",config.symname, err))
350350
} else {
351351
cb(handle)
352352
}

0 commit comments

Comments
 (0)