mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Added error handling to 50-file.js
This commit is contained in:
		| @@ -81,10 +81,11 @@ module.exports = function(RED) { | |||||||
|                 fs.readFile(filename,options,function(err,data) { |                 fs.readFile(filename,options,function(err,data) { | ||||||
|                     if (err) { |                     if (err) { | ||||||
|                         node.warn(err); |                         node.warn(err); | ||||||
|  |                         msg.error = err; | ||||||
|                     } else { |                     } else { | ||||||
|                         msg.payload = data; |                         msg.payload = data; | ||||||
|                         node.send(msg); |  | ||||||
|                     } |                     } | ||||||
|  |                     node.send(msg); | ||||||
|                 }); |                 }); | ||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user