mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +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.
|
||||
*/
|
||||
|
||||
import { RenderingCancelledException } from "pdfjs-lib";
|
||||
|
||||
const CLEANUP_TIMEOUT = 30000;
|
||||
|
||||
const RenderingStates = {
|
||||
|
@ -170,6 +172,9 @@ class PDFRenderingQueue {
|
|||
this.renderHighestPriority();
|
||||
})
|
||||
.catch(reason => {
|
||||
if (reason instanceof RenderingCancelledException) {
|
||||
return;
|
||||
}
|
||||
console.error(`renderView: "${reason}"`);
|
||||
});
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue