Snippets Collections
 process.on('unhandledRejection', (error) => {
    throw error;
  });

  process.on('uncaughtException', (error) => {
    logError(error);

    if (!isOperationalError(error)) {
      process.exit(1);
    }
  });
star

Tue Aug 24 2021 16:30:12 GMT+0000 (UTC) https://sematext.com/blog/node-js-error-handling/

#nodejs #promises #unhandled

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension