-
Notifications
You must be signed in to change notification settings - Fork 498
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
RFC / WIP (do not merge): surface cURL errors #194
Conversation
474e739
to
da6a071
Compare
* | ||
* @var string | ||
*/ | ||
protected $reason = 'The requested sharing could not be done because the library you use don't have that particular feature enabled. (Added in 7.23.0)'; |
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.
need to handle apostrophes
Pretty cool otherwise 👍 |
Class 'Requests_Exception_Transport_cURL_Easy' not found in /home/travis/build/rmccue/Requests/library/Requests/Transport/cURL.php on line 234 |
yup, only "mostly" complete. Still looking at what I want that inheritance chain to look like. |
I'd think these should all be in a single exception class, Generally though, I think the approach of using a separate hook is good here, and we should definitely be detecting the errors better than we do currently. Thanks for your work on the PR so far 🌴 |
Forgot to mention also: if we can get these consistent across both, I wouldn't be against generic |
Ah, ok, yeah, as long as I can make a decision on how to handle the error code, I'd be in favor of fewer classes. |
3494d70
to
de4a6ae
Compare
I know this needs some whitespace cleanup, but I can't seem to get the tests to pass locally on master, so I'm not what is and what is not a legitimate failure. |
de4a6ae
to
2c3efe2
Compare
a bit cleaner now. |
working on fixing up the tests. |
2c3efe2
to
91d3ae2
Compare
ok, not sure what's up with those last two errors. |
dd90e15
to
ec3f2b3
Compare
ok, please take a look at this version. I'm not sure why the tests are failing, but I don't see how the ones remaining could be due to my change. Earlier, I had messed up a merge/rebase, and so there were legitimate errors. seems like there's a network issue with the tests. |
Sorry for the delay here, had to work out why the tests were failing! Can you merge master into here please? :) |
|
||
class Requests_Exception_Transport_cURL extends Requests_Exception_Transport { | ||
|
||
const EASY = 'cURLEasy'; |
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.
Indentation needs to be tabs, not spaces.
3494d70
to
9f0d62d
Compare
implementation for cURL using new exception class
Should be a bit cleaner now. |
Fantastic, thanks so much! |
RFC / WIP (do not merge): surface cURL errors
This is a work in progress, but I wanted to get comments sooner rather than later, since this is mostly complete.
I have a couple use cases involved here:
Please take a look and tell me what you think.