Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Dec : Re: How to prevent exception messages being shown in FTP client application & FT
| Subject: | Re: How to prevent exception messages being shown in FTP client application & FT |
| Posted by: | "Venkatesh VT" (ven..@vsnl.com) |
| Date: | Thu, 28 Dec 2006 09:03:44 +0530 |
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:<4592c6e0$1@newsgroups.borland.com>...
> > How do I prevent the message from displaying at all.(I am using try
> > ..finally so that the program continues to run inspite of the Exception
> > messages)
>
> A try..finally block does not catch exceptions. It only executes the code
> inside the 'finally' section and then allows the exception to continue
along
> the call stack. To actually catch the exception, you need to use a
> try..except block instead.
>
> Use the Disconnect() method instead.
>
>
> Gambit
>
Thanks for the reply.I am using Disconnect & it is not giving any
problem.How ever how do I prevent the exception dialog message (i.e. socket
error 10541.Connection reset by peer)from showing up at all or how do I
close it through code(since it is onunattended machine)
Venkatesh