From 225734dd00cf1359dcd46c990e150ac3c313d8bf Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 14 Jun 2023 15:40:25 +0200 Subject: [PATCH] [api-minor] Remove the `type` from `RenderingCancelledException` (PR 16226 follow-up) After PR 16226 we're only using `RenderingCancelledException` together with canvas-rendering, hence the `type`-property is no longer necessary. --- src/display/api.js | 1 - src/display/display_utils.js | 3 +-- test/unit/api_spec.js | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/display/api.js b/src/display/api.js index 46ceef1ac..76afa6333 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -3347,7 +3347,6 @@ class InternalRenderTask { error || new RenderingCancelledException( `Rendering cancelled, page ${this._pageIndex + 1}`, - "canvas", extraDelay ) ); diff --git a/src/display/display_utils.js b/src/display/display_utils.js index 452111c7b..18db2c4f9 100644 --- a/src/display/display_utils.js +++ b/src/display/display_utils.js @@ -583,9 +583,8 @@ class PageViewport { } class RenderingCancelledException extends BaseException { - constructor(msg, type, extraDelay = 0) { + constructor(msg, extraDelay = 0) { super(msg, "RenderingCancelledException"); - this.type = type; this.extraDelay = extraDelay; } } diff --git a/test/unit/api_spec.js b/test/unit/api_spec.js index f3e7453bf..de2744b5c 100644 --- a/test/unit/api_spec.js +++ b/test/unit/api_spec.js @@ -3075,7 +3075,6 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`) } catch (reason) { expect(reason instanceof RenderingCancelledException).toEqual(true); expect(reason.message).toEqual("Rendering cancelled, page 1"); - expect(reason.type).toEqual("canvas"); expect(reason.extraDelay).toEqual(0); }