Skip to content

Commit b3e32e2

Browse files
Merge pull request #12446 from Snuffleupagus/firefox-print-RenderingCancelledException
[Firefox] Stop logging `RenderingCancelledException`s as errors when printing
2 parents a1028e2 + 069ddc8 commit b3e32e2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

web/firefox_print_service.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
* limitations under the License.
1414
*/
1515

16+
import { RenderingCancelledException, shadow } from "pdfjs-lib";
1617
import { CSS_UNITS } from "./ui_utils.js";
1718
import { PDFPrintServiceFactory } from "./app.js";
18-
import { shadow } from "pdfjs-lib";
1919

2020
// Creates a placeholder with div and canvas with right size for the page.
2121
function composePage(
@@ -85,8 +85,10 @@ function composePage(
8585
}
8686
obj.done();
8787
},
88-
function (error) {
89-
console.error(error);
88+
function (reason) {
89+
if (!(reason instanceof RenderingCancelledException)) {
90+
console.error(reason);
91+
}
9092

9193
if (currentRenderTask === thisRenderTask) {
9294
currentRenderTask.cancel();

0 commit comments

Comments
 (0)