mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Added error handling to 50-file.js
This commit is contained in:
parent
4e1d45b508
commit
785d4a66f0
@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user