constructor(errorDefinition, properties, options) {
    super(errorDefinition.code, options);
    this.name = 'LighthouseError';
    this.code = errorDefinition.code;
    // Add additional properties to be ICU replacements in the error string.
    // `code` is always added as `errorCode` so callers don't need to specify the code multiple times.
    this.friendlyMessage = str_(errorDefinition.message, {errorCode: this.code, ...properties});
    this.lhrRuntimeError = !!errorDefinition.lhrRuntimeError;
    if (properties) Object.assign(this, properties);

    Error.captureStackTrace(this, LighthouseError);
  }
@param {LighthouseErrorDefinition} errorDefinition
@param {Record<string, string|undefined>=} properties
@param {LHErrorOptions=} options