mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Ignore RenderingCancelledException
when logging errors in PDFRenderingQueue.renderView
Note that a `RenderingCancelledException` *should* never actually reach this method, but better safe than sorry I suppose, considering that both `PDFPageView` and `PDFThumbnailView` are already catching `RenderingCancelledException`s since those are *not* Errors in the normal sense of the word.
This commit is contained in:
parent
120c5c2261
commit
7b15094cdf
1 changed files with 5 additions and 0 deletions
|
@ -13,6 +13,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { RenderingCancelledException } from "pdfjs-lib";
|
||||||
|
|
||||||
const CLEANUP_TIMEOUT = 30000;
|
const CLEANUP_TIMEOUT = 30000;
|
||||||
|
|
||||||
const RenderingStates = {
|
const RenderingStates = {
|
||||||
|
@ -170,6 +172,9 @@ class PDFRenderingQueue {
|
||||||
this.renderHighestPriority();
|
this.renderHighestPriority();
|
||||||
})
|
})
|
||||||
.catch(reason => {
|
.catch(reason => {
|
||||||
|
if (reason instanceof RenderingCancelledException) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
console.error(`renderView: "${reason}"`);
|
console.error(`renderView: "${reason}"`);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue