mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Merge pull request #16550 from Snuffleupagus/rm-RenderingCancelledException-type
[api-minor] Remove the `type` from `RenderingCancelledException` (PR 16226 follow-up)
This commit is contained in:
commit
0650be4641
3 changed files with 1 additions and 4 deletions
|
@ -3347,7 +3347,6 @@ class InternalRenderTask {
|
||||||
error ||
|
error ||
|
||||||
new RenderingCancelledException(
|
new RenderingCancelledException(
|
||||||
`Rendering cancelled, page ${this._pageIndex + 1}`,
|
`Rendering cancelled, page ${this._pageIndex + 1}`,
|
||||||
"canvas",
|
|
||||||
extraDelay
|
extraDelay
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -583,9 +583,8 @@ class PageViewport {
|
||||||
}
|
}
|
||||||
|
|
||||||
class RenderingCancelledException extends BaseException {
|
class RenderingCancelledException extends BaseException {
|
||||||
constructor(msg, type, extraDelay = 0) {
|
constructor(msg, extraDelay = 0) {
|
||||||
super(msg, "RenderingCancelledException");
|
super(msg, "RenderingCancelledException");
|
||||||
this.type = type;
|
|
||||||
this.extraDelay = extraDelay;
|
this.extraDelay = extraDelay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3075,7 +3075,6 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`)
|
||||||
} catch (reason) {
|
} catch (reason) {
|
||||||
expect(reason instanceof RenderingCancelledException).toEqual(true);
|
expect(reason instanceof RenderingCancelledException).toEqual(true);
|
||||||
expect(reason.message).toEqual("Rendering cancelled, page 1");
|
expect(reason.message).toEqual("Rendering cancelled, page 1");
|
||||||
expect(reason.type).toEqual("canvas");
|
|
||||||
expect(reason.extraDelay).toEqual(0);
|
expect(reason.extraDelay).toEqual(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue