cURL / Mailing Lists / curl-library / Single Mail


RE: can you throw exceptions from curl callbacks

From: Peter Walker <>
Date: Tue, 10 Feb 2009 09:08:53 -0000

Thanks, I'm new to using curl and missed the pointer :)

Peter Walker
Senior Developer
Ticketmaster UK
48 Leicester Square
London WC2H 7LR
T: +44 (0) 207 022 8547
F: +44 (0) 207 915 0411
M: +44 (0) 7855 441471
This e-mail is private and confidential and may contain proprietary or
legally privileged information. It is for the intended recipient only.
If you have received this e-mail in error, please notify the author by
replying to it and then destroy it. If you are not the intended
recipient you must not use, disclose, distribute, copy, print or rely on
this e-mail or any attachment.
Thank You!
-----Original Message-----
[] On Behalf Of Daniel Stenberg
Sent: 09 February 2009 21:39
To: libcurl development
Subject: Re: can you throw exceptions from curl callbacks

On Mon, 9 Feb 2009, Peter Walker wrote:

> Is this the norm, meaning i cannot use exceptions in the callback

The callback functions are pure C functions, there are no exceptions in

> If so, how do I indicate this error back to the calling application.

By returning the right return code you make the transfer fail. If you
want to
provide something specific back from the callback I suggest you use the
user-provided pointer.

Received on 2009-02-10