cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

wanted generic CURLcode value

From: Marco Maggi <marco.maggi-ipsu_at_poste.it>
Date: Mon, 23 Nov 2009 06:37:03 +0100

Ciao,

  I am writing a binding for a language; as utility
function, I want to write a callback generator for the
"curl_conv_callback" type to be used with the:

CURLOPT_CONV_TO_NETWORK_FUNCTION
CURLOPT_CONV_FROM_NETWORK_FUNCTION
CURLOPT_CONV_FROM_UTF8_FUNCTION

options. I create a default callback function which in turn
invokes a function selected by the client code.

  When the language raises an exception, I catch it in the
default callback and I need to return an error code; an
unexpected exception (like a type error) cannot be
automatically translated into a meaningful "CURLcode" value,
so I would need a generic error code meaning "things gone
bad", but I find no such value in the "enum CURLcode"
definition. Right now I have selected "CURLE_OBSOLETE10"
and documented it in my package; is there a better option?

TIA

P.S. The documentation says CURLOPT_TFTPBLKSIZE, but it is
CURLOPT_TFTP_BLKSIZE.
<http://curl.haxx.se/libcurl/c/curl_easy_setopt.html>

-- 
Marco Maggi
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-23

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET