Article View: borland.public.cppbuilder.internet.socket
Article #5326Re: TIdTelnet catch exception
From: Remy Lebeau (TeamB)
Date: Wed, 18 Aug 2004 06:55
Date: Wed, 18 Aug 2004 06:55
21 lines
1443 bytes
1443 bytes
"Geaorge" <gharris@yahoo.com> wrote in message
news:4122d054$1@newsgroups.borland.com...
> I perform a COnnect() and I want to be able to tell if it
> succeeds or not, and suppress the generix exception it
> throws. Can someone shwo me an example of catching
> the exception that comes back if it cannot connect?
Use a try...except block like when catching any other exception in general,
ie:
try
IdTelnet.Connect;
// connected...
except
// could not connect....
end;
Gambit
Technical Details
Message-ID:
<4122fd50@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!uio.no!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4122d054$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,543856a01aa222d8 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <4122d054$1@newsgroups.borland.com> Subject: Re: TIdTelnet catch exception Date: Tue, 17 Aug 2004 23:55:56 -0700 Lines: 23 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: <4122fd50@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1092812112 68.69.17.41 (17 Aug 2004 23:55:12 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!uio.no!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail