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

Re: when curl_easy_init fails...

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 21 Nov 2009 10:32:05 +0100 (CET)

On Sat, 21 Nov 2009, Marco Maggi wrote:

> is it correct that when "curl_easy_init()" returns NULL there is no way to
> get a meaningful error code?

Correct. It's a little design flaw really, but when I made the API that way
(back in 2000) I didn't really expect other errors than malloc() failures to
cause a NULL return.

> Is there a way to distinguish between out-of-memory errors and other errors?

No. But if you get it in a development environment you can of course just use
a debugger to find out details.

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

These mail archives are generated by hypermail.

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

File upload with ASP.NET