function handleError(err) {
    if (module.hot.status() in failureStatuses) {
      if (options.warn) {
        console.warn('[HMR] Cannot check for update (Full reload needed)');
        console.warn('[HMR] ' + (err.stack || err.message));
      }
      performReload();
      return;
    }
    if (options.warn) {
      console.warn('[HMR] Update check failed: ' + (err.stack || err.message));
    }
  }
A function that creates an event handler for the `unhandledrejection` event.
@param {EventCallback} callback A function called to handle the error context.
@returns {EventHandler} A handler for the `unhandledrejection` event.