Article View: borland.public.cppbuilder.internet.socket
Article #5482Re: Exception Handling
From: Remy Lebeau (TeamB)
Date: Tue, 10 Aug 2004 17:23
Date: Tue, 10 Aug 2004 17:23
18 lines
1560 bytes
1560 bytes
"mike" <mfbrowne@earthlink.net> wrote in message news:4118e06b@newsgroups.borland.com... > Could someone explain to me how to handle an exception > when trying to open a connection from a TClientSocket. If you are using the ClientSocket in non-blocking mode then you can't use exception handling when calling Open() as any exception thrown will be delayed, thrown long after Open() returns and your exception handling is exited. You should use the OnError event to catch errors, and you can optionally then set the ErrorCode parameter to 0 to prevent exceptions from being thrown at all. Otherwise, use the ClientSocket in blocking mode instead. Gambit
Technical Details
Message-ID:
<4119046a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4118e06b@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,234111ec25ac0a9d 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: <4118e06b@newsgroups.borland.com> Subject: Re: Exception Handling Date: Tue, 10 Aug 2004 10:23:29 -0700 Lines: 20 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: <4119046a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1092158570 68.69.17.41 (10 Aug 2004 10:22:50 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail