🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1611

Re: nmhttp - different between timeout and failure

#1611
From: Steffan Kahn
Date: Mon, 01 Nov 2004 20:23
52 lines
2226 bytes
Hi,

problem is that i am not working with indy components. i am using nmhttp
which is inside my bcb5. your exmaple looks like indy example.

is it also possible for nmhttp do decide whether there is an timeout or an
connection problem?

Steffan

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> schrieb im Newsbeitrag
news:41867cf2$1@newsgroups.borland.com...
>
> "Steffan Kahn" <s_kahn@yahoo.com> wrote in message
> news:41867801@newsgroups.borland.com...
>
> > when is use following code to call ab website:
> <snip>
> > how can i determine whether i get an timeout or
> > an failure if there are any problems.
>
> By not using "..." in your catch statement to begin with.  You can't get
> *any* error information by using that.  You should be catching specific
> Exception types instead, then you can check to see what type of exception
is
> being thrown, ie:
>
>     try
>     {
>         HTTP->Get(Url);
>     }
>     const (const EIdConnectException &e)
>     {
>         // connection timeout...
>     }
>     catch (const EIdReadTimeout &e)
>     {
>         // reading timeout...
>     }
>     catch (const EIdException &e)
>     {
>         // any Indy exception...
>     }
>     catch (const Exception &e)
>     {
>         // any VCL exception...
>     }
>
>
> Gambit
>
>
Technical Details
Message-ID: <41869b58$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41867801@newsgroups.borland.com> <41867cf2$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,6dac115b128d7ee0
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Steffan Kahn" <s_kahn@yahoo.com>
Newsgroups: borland.public.cppbuilder.internet.web
References: <41867801@newsgroups.borland.com> <41867cf2$1@newsgroups.borland.com>
Subject: Re: nmhttp - different between timeout and failure
Date: Mon, 1 Nov 2004 21:23:38 +0100
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 80.134.159.118
Message-ID: <41869b58$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1099340632 80.134.159.118 (1 Nov 2004 12:23:52 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail