I wanted to know if there was a way to catch this error:
FATAL ERROR: CALL_AND_RETRY_0 Allocation failed - process out of memory
I have tried:
process.on('uncaughtException', function(err){
//do something
})
But this did not catch the error.
Any help would be greatly appreciated
P.S This is happening when generating MD5 hashes for a string of about eighteen files and I am using the md5 module like this:
for(i=0;i<array.length;i++){
fs.readFile(array[i], function(err,buf){
console.log(mdf(buf))
})
}