-
Notifications
You must be signed in to change notification settings - Fork 56
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
Document exceptions #71
Conversation
due to network issues ``getRequest()`` | ||
|nbsp| |nbsp| └ HttpException error response ``getRequest()`` | ||
``getResponse()`` | ||
================================== ====================== =================== |
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.
Is TransferException
used directly? If not, why isn’t it abstract?
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.
I think we already went down this path. TransferException is used somewhere, don't ask where, I don't know. 😛
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.
for example here, when we don't know exactly what is happening: https://github.com/php-http/guzzle6-adapter/blob/master/src/Promise.php#L138
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.
so i would say "when something unexpected happened"
👍 should we mention async? maybe as a note at the bottom, linking to the async documentation. i think it makes more sense to explain the details of exception handling in the promise/async doc page than here. still, the exceptions returned by Promise::wait() are the same as here, with the same semantics. |
If by same you mean Promise can throw HTTPlug and SPL exceptions then yes. |
i mean that on a failed request, the promise must return the same
exception as is thrown by sendRequest on a failed request. so the
explanation of which exception means what is also relevant for the promises.
|
Ah, I see. |
What's the situation with this one? |
ping @ddeboer |
i have rebased this and added the note about promise. imho ready to merge |
👍 |
Fix #7