Various little tweaks - less console.log more util.log, add exra try/catch to serial, add wiring-pi url to Pi "error message".

This commit is contained in:
Dave C-J
2013-11-03 19:09:45 +00:00
parent 2e92b9a120
commit d9ed5b46c4
4 changed files with 156 additions and 156 deletions

View File

@@ -31,19 +31,19 @@ function Xml2jsNode(n) {
var node = this;
this.on("input", function(msg) {
try {
parseString(msg.payload, function (err, result) {
if (err) { node.error(err); }
else {
msg.payload = result;
node.send(msg);
if (node.useEyes == true) {
if (gotEyes == true) { eyes.inspect(msg); }
else { node.log(JSON.stringify(msg)); }
}
}
});
}
catch(e) { console.log(e); }
parseString(msg.payload, function (err, result) {
if (err) { node.error(err); }
else {
msg.payload = result;
node.send(msg);
if (node.useEyes == true) {
if (gotEyes == true) { eyes.inspect(msg); }
else { node.log(JSON.stringify(msg)); }
}
}
});
}
catch(e) { util.log("[73-parsexml.js] "+e); }
});
}
RED.nodes.registerType("xml2js",Xml2jsNode);