Make parser nodes errors actual errors.

(more cleanup will probably be necessary - but this is a start)
This commit is contained in:
dceejay
2015-02-23 19:30:15 +00:00
parent dc7701ad70
commit 9f012c261a
4 changed files with 7 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ module.exports = function(RED) {
msg.payload = JSON.parse(msg.payload);
node.send(msg);
}
catch(e) { node.log(e+ "\n"+msg.payload); }
catch(e) { node.error(e+ "\n"+msg.payload); }
}
else if (typeof msg.payload === "object") {
if (!Buffer.isBuffer(msg.payload) ) {
@@ -38,7 +38,7 @@ module.exports = function(RED) {
}
}
}
else { node.log("dropped: "+msg.payload); }
else { node.warn("dropped: "+msg.payload); }
}
});
}