importExitModuleOrFail = (moduleSpecifier, compartmentDescriptor) => {
      if (exitModuleImportNowHook) {
        // This hook is responsible for ensuring that the moduleSpecifier
        // actually refers to an exit module.
        const exitRecord = exitModuleImportNowHook(
          moduleSpecifier,
          packageLocation,
        );
        if (exitRecord) {
          // It'd be nice to check the policy before importing it, but we can only throw a policy error if the
          // hook returns something. Otherwise, we need to fall back to the 'cannot find' error below.
          enforceModulePolicy(moduleSpecifier, compartmentDescriptor, {
            exit: true,
            errorHint: `Blocked in loading. ${q(
              moduleSpecifier,
            )} was not in the compartment map and an attempt was made to load it as a builtin`,
          });
          return exitRecord;
        }
        throw Error(
          `Cannot find external module ${q(
            moduleSpecifier,
          )} in package at ${packageLocation}`,
        );
      } else {
        throw Error(
          `Cannot find external module ${q(
            moduleSpecifier,
          )} from package at ${packageLocation}; try providing an importNowHook`,
        );
      }
    }
Attempt to load the moduleSpecifier via an {@link ExitModuleImportNowHook}, if one exists.

If it doesn't exist, then throw an exception.
@param {string} moduleSpecifier
@param {CompartmentDescriptor} compartmentDescriptor
@returns {VirtualModuleSource}