constructor(internalRenderTask) {
    this.#internalRenderTask = internalRenderTask;

    if (typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) {
      // For testing purposes.
      Object.defineProperty(this, "getOperatorList", {
        value: () => this.#internalRenderTask.operatorList,
      });
    }
  }
A function that will be synchronously called when the rendering tasks
finishes with an error (either because of an actual error, or because the
rendering is cancelled).

@type {function}
@param {Error} error