-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[api-major] Replace MissingPDFException and UnexpectedResponseException with one exception
#19264
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
Conversation
|
Given that this is part of the public API, and I can imagine that third-party implementations actually handle the current exceptions, should we perhaps classify this as |
9551077 to
9a5ed18
Compare
MissingPDFException and UnexpectedResponseException with one exceptionMissingPDFException and UnexpectedResponseException with one exception
I suppose that's a fair comment; I've updated the commit message and PR title. It's been a while since we bumped the major version number, and there's also a few things in progress (e.g. canvas tiling) that are significant enough to perhaps warrant a major version bump. |
eda9788 to
9f49568
Compare
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/328150fc0c5c6f4/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/f562810b159cb5b/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/f562810b159cb5b/output.txt Total script time: 28.19 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/328150fc0c5c6f4/output.txt Total script time: 51.90 mins
|
9f49568 to
158ce91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, with one comment below. I do wonder if we want to wait with merging this until everything that should become part of PDF.js 5.x is identified so that in the meantime we can still make releases in the 4.x series if we need/want to?
158ce91 to
236f888
Compare
…ption` with one exception These old exceptions have a fair amount of overlap given how/where they are being used, which is likely because they were introduced at different points in time, hence we can shorten and simplify the code by replacing them with a more general `ResponseException` instead. Besides an error message, the new `ResponseException` instances also include: - A numeric `status` field containing the server response status, similar to the old `UnexpectedResponseException`. - A boolean `missing` field, to allow easily detecting the situations where `MissingPDFException` was previously thrown.
236f888 to
75cba72
Compare
|
/botio-linux test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/99dbff08a31907f/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/99dbff08a31907f/output.txt Total script time: 28.21 mins
|
These old exceptions have a fair amount of overlap given how/where they are being used, which is likely because they were introduced at different points in time, hence we can shorten and simplify the code by replacing them with a more general
ResponseExceptioninstead.Besides an error message, the new
ResponseExceptioninstances also include:A numeric
statusfield containing the server response status, similar to the oldUnexpectedResponseException.A boolean
missingfield, to allow easily detecting the situations whereMissingPDFExceptionwas previously thrown.