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
@ -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…
x
Reference in New Issue
Block a user