🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
2 messages
2 total messages Started by Geaorge Wed, 18 Aug 2004 03:43
TIdTelnet catch exception
#5324
Author: Geaorge
Date: Wed, 18 Aug 2004 03:43
4 lines
1093 bytes
I have a small app that uses TIdTelnet
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? 
Many thanks
Re: TIdTelnet catch exception
#5326
Author: Remy Lebeau (TeamB)
Date: Wed, 18 Aug 2004 06:55
21 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads