Skip to content
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

Getting text representation of error #49

Closed
janki1 opened this issue Jan 24, 2017 · 6 comments
Closed

Getting text representation of error #49

janki1 opened this issue Jan 24, 2017 · 6 comments

Comments

@janki1
Copy link

janki1 commented Jan 24, 2017

Hi,

is any chance to get text representation of curl error not only error code ?
Like using curl_error function ?

Thanks for response.

@linslin
Copy link
Owner

linslin commented Jan 24, 2017

Hey, thanks for your question.

We could implement a helper function which will return the text representation like http://php.net/manual/en/function.curl-strerror.php (https://curl.haxx.se/libcurl/c/curl_easy_strerror.html) based on https://curl.haxx.se/libcurl/c/libcurl-errors.html.

While this library will not support localizations we will not implement custom text messages. We recommend to create a own helper which deliver you a error message based on the curl error code. In that way you could use localizations from third party libraries (in this case yii2 http://www.yiiframework.com/doc-2.0/guide-tutorial-i18n.html)

@linslin
Copy link
Owner

linslin commented Jan 30, 2017

@janki1 any feedback or suggestions?

@janki1
Copy link
Author

janki1 commented Feb 14, 2017 via email

@linslin
Copy link
Owner

linslin commented Feb 14, 2017

Accepted, we will release this feature in the coming version.

@janki1
Copy link
Author

janki1 commented Feb 14, 2017 via email

linslin added a commit that referenced this issue Mar 2, 2017
@linslin linslin closed this as completed Mar 2, 2017
@linslin
Copy link
Owner

linslin commented Mar 2, 2017

$curl->errorText is now available in develop branch and will be released in version 1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants