curl-library
Re: libcurl smtp error list?
Date: Fri, 29 Jun 2018 14:19:06 +0530
On Friday 29 June 2018 01:02 PM, Daniel Stenberg wrote:
> On Fri, 29 Jun 2018, Deven wrote:
>
>> I want to handle errors from curl_easy_perform() and provide a
>> feedback to the users on what went wrong (SMTP server not correct,
>> authentication failure, network not reachable, etc.). The errors
>> mentioned in curl.h header are quite general (at least to me). Is
>> there a list of protocol specific errors (in this case SMTP)?
>
> No, there isn't. And I'm afraid it isn't likely to ever exist one
> either. And it is actually a little done like this on purpose.
>
> A lot of libcurl code is generic for all/many protocols and we have a
> generic error code handling all over. It not only makes it very hard
> to figure out exactly what error codes that can be returned for what
> protocols, it also makes it a fairly "unstable" situation in the way
> that we may change internals for the next release and then change the
> possible returns codes.
>
This makes testing really difficult, unless you know the internals of
libcurl. And if the return codes change across releases, then handling
errors (to provide error feedback to the user) across different libcurl
versions becomes impossible.
Thanks,
-Deven
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-06-29