🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #3323

Re: TClientSocket and error events

#3323
From: Stormy
Date: Fri, 14 Oct 2005 07:39
19 lines
1686 bytes
Remy Lebeau (TeamB) wrote:
> You should be using the TClientSocket's OnError event to handle socket
> errors.

OnError event does not get triggered if exception occurs. Sockets mostly
throw exceptions and I have no idea how to omit this.

> Please show your actual code to reproduce that.  You should not be
> getting any error involving the previous Host.

I posted a simplified code that demonstrates this on attachments group.
Please take a look.

> What exactly are you trying to accomplish?

Prevent socket exceptions from triggering messagebox. Since messagebox
requires user interaction (must click OK), and I want my application to run
in background, logging or showing errors other way. This is why I use
exception handler in my code.
Technical Details
Message-ID: <434f5fe5@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <434eecdf@newsgroups.borland.com> <434f0102$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,bc23240211b4e678
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Stormy" <s70rmy@hotmail.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <434eecdf@newsgroups.borland.com> <434f0102$1@newsgroups.borland.com>
Subject: Re: TClientSocket and error events
Date: Fri, 14 Oct 2005 09:39:09 +0200
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 193.198.144.229
Message-ID: <434f5fe5@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1129275365 193.198.144.229 (14 Oct 2005 00:36:05 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail