Article View: borland.public.cppbuilder.internet.web
Article #1614Re: nmhttp - different between timeout and failure
From: Remy Lebeau (TeamB)
Date: Mon, 01 Nov 2004 22:21
Date: Mon, 01 Nov 2004 22:21
45 lines
2174 bytes
2174 bytes
"Steffan Kahn" <s_kahn@yahoo.com> wrote in message
news:4186b3ec@newsgroups.borland.com...
> at this application i like to stay at nmhttp. i looked into
> the vcl help file and also in the help for nmhttp. but i can't
> anywhere find out information how to differentiate between
> a timeout and an error.
I already told you what to do. Change your code to catch the Exception
class instead of "..." and then query the Exception to find out what it
actualy is when things occur. For example:
try
{
HTTP->Get(Url);
}
catch (const Exception &e)
{
ShowMessage(e.ClassName());
}
Once you know which types of exceptions are thrown, you can update your code
acordingly:
try
{
HTTP->Get(Url);
}
catch (const ExceptionTypeWhenATimeoutOccured &e)
{
//...
}
catch (const ExceptionTypeWhenAnErrorOccured &e)
{
//...
}
> furthermore i couldn't find any information in the
> exceptionen classes help.
Third party exceptions are not documented at all, especially Netmasters'.
Gambit
Technical Details
Message-ID:
<4186b68f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41867801@newsgroups.borland.com> <41867cf2$1@newsgroups.borland.com> <41869b58$1@newsgroups.borland.com> <4186a83f$1@newsgroups.borland.com> <4186b3ec@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: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.web References: <41867801@newsgroups.borland.com> <41867cf2$1@newsgroups.borland.com> <41869b58$1@newsgroups.borland.com> <4186a83f$1@newsgroups.borland.com> <4186b3ec@newsgroups.borland.com> Subject: Re: nmhttp - different between timeout and failure Date: Mon, 1 Nov 2004 14:21:05 -0800 Lines: 47 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <4186b68f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1099347599 68.69.17.41 (1 Nov 2004 14:19:59 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail