You are reading a single comment by @d0773d and its replies. Click here to read the full conversation.
  • Thx @d0773d, I had a previous issue before with nodejs crashing and after doing lots of research for error handling etc it didn't actually work as I wanted.

    Still I found this lovely piece of code that actually prevented nodejs from crashing whatever happens.

    process.on('uncaughtException', function (err) {
      console.error(err);
      console.log("Node NOT Exiting...");
    });
    

    Hope it would help.

  • @sameh.hady thanks for the help. I will surely give that a try over the weekend and respond back with my results.

    In the mean time, do you happen to know if I will need to instantiate the node.js ws server again even though the uncaughtException is captured and node.js does NOT crash?

About

Avatar for d0773d @d0773d started