cURL / Mailing Lists / curl-library / Single Mail


Re: curl exception with bad url

From: Robert Navarro <>
Date: Mon, 22 Aug 2011 18:58:38 -0400

On Mon, Aug 22, 2011 at 6:08 PM, Daniel Stenberg <> wrote:
> On Mon, 22 Aug 2011, Robert Navarro wrote:
>> when the system receiving messages at that URL is down or not responding,
>> I get an exception instead of a timeout return.
> That sounds unlikely. libcurl is a C library and it can't generate
> exceptions.
>> try
>> {
>> res = curl_easy_perform(curl);
>> }
>> catch (System::Exception* e)  <--- catching this because I don't know
>> what else to catch, prevents service from stopping
> I have no idea how you'd get an exception from that function call!
> --

Haha, you are right about that. What I should have said was that if I
do NOT have that catch there, it will completely stop the service,
which is of course not desirable. Since the catch prevents that
somehow, I will leave it there :).

For now we can pretend I do not use a try/catch, and the problem is
that the service will stop (crash) after:

res = curl_easy_perform(curl);

List admin:
Received on 2011-08-23