Skip to content

Dispatch a "documenterror" event in PDFViewerApplication._documentError (issue 14451) #14453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2022

Conversation

Snuffleupagus
Copy link
Collaborator

Please note: This is a tentative patch, since I don't know if this is deemed important enough to fix.

The new event could be seen as a supplement to the existing "documentinit" and "documentloaded" events, but for the case when a PDF document fails to load.
To make the "documenterror" event generally useful, it'll include both the localized error message as well as the original reason for the error (when that exists).

This (probably) fixes #14451

…ror` (issue 14451)

*Please note:* This is a tentative patch, since I don't know if this is deemed important enough to fix.

The new event could be seen as a *supplement* to the existing "documentinit" and "documentloaded" events, but for the case when a PDF document fails to load.
To make the "documenterror" event generally useful, it'll include both the localized error message as well as the original reason for the error (when that exists).
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/1c667f26c36ae0d/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/1c667f26c36ae0d/output.txt

Total script time: 4.50 mins

Published

@timvandermeij timvandermeij merged commit 78f160b into mozilla:master Jan 15, 2022
@timvandermeij
Copy link
Contributor

The change is small enough and I can see it being a somewhat useful supplement to documentloaded. Thanks!

@Snuffleupagus Snuffleupagus deleted the viewer-documenterror branch January 15, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Catch Load Errors
3 participants