cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLcode_strerror

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 5 Mar 2004 13:21:05 +0100 (CET)

On Thu, 4 Mar 2004, Peter Miller wrote:

> What was the consensus on the *_strerror functions?

I would prefer to see one unified curl_strerror() function:

 char *curl_strerror(int errorcode, int errortype);

The 'errortype' would then be telling which interface that returned the given
'errorcode'.

Like:

 CURLcode res;
 CURLMcode mres;

 res = curl_easy_perform();

 printf("%s\n", curl_strerror(res, CURLERROR_EASY));

 mres = curl_multi_perform();

 printf("%s\n", curl_strerror(mres, CURLERROR_MULTI));

(The names could be different, I just made them up now to illustrate my
point.)

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-03-05