Added error handling to 50-file.js

pull/243/head
tjkoury 2014-06-02 15:25:48 -04:00
parent 4e1d45b508
commit 785d4a66f0
1 changed files with 4 additions and 3 deletions

View File

@ -81,10 +81,11 @@ module.exports = function(RED) {
fs.readFile(filename,options,function(err,data) {
if (err) {
node.warn(err);
msg.error = err;
} else {
msg.payload = data;
node.send(msg);
}
node.send(msg);
});
}
});