1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Removing unreachable catch blocks

This commit is contained in:
hbeeken 2014-08-04 10:07:45 +01:00
parent 8eb8ac0f88
commit 38c541361e

View File

@ -26,14 +26,10 @@ module.exports = function(RED) {
this.on("input", function(msg) {
if (msg.hasOwnProperty("payload")) {
if (typeof msg.payload == "object") {
try {
msg.payload = builder.buildObject(msg.payload);
node.send(msg);
}
catch(e) { node.log(e); }
}
else if (typeof msg.payload == "string") {
try {
parseString(msg.payload, {strict:true,async:true}, function (err, result) {
if (err) { node.error(err); }
else {
@ -42,8 +38,6 @@ module.exports = function(RED) {
}
});
}
catch(e) { node.log(e); }
}
else { node.log("This node only handles xml strings or js objects."); }
}
});