🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Authenticate problem

#3713
From: Bud Manz
Date: Tue, 26 Jul 2005 22:54
58 lines
2765 bytes
Hi Gambit,

I am using BCB6.  Maybe it is just that I {embarrassed grin} am
attempting to use a try, catch for the first time...

If my understanding is correct, the try block will "try" a
block of instruction(s) and return an error code to the catch
block upon completion.  Then, depending on the code, the
program can act appropriately.  Is this correct?

Bud

"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>
>"Bud Manz" <amanz@northweststate.edu> wrote in message
>news:42e67c8d$1@newsgroups.borland.com...
>
>> I am trying to use the TIdSMTP control's Validate() function.
>> Can someone point me in the right direction?
>
>What exactly do you need help with about it?
>
>> When I use it in a try block, I can't seem to catch the error,
>> the program blows up on me instead.
>
>Please elaborate.
>
>> IdSMTP1->Connect();
>> fromAddress = InputBox("Sender Info", "Please insert your email info:",
>"Alvin Manz <amanz@northweststate.edu>");
>> userID = InputBox("User ID", "Please enter your email user id:\n\t(the
>portion before the @ sign)", "amanz");
>> userPword = InputBox("Password", "Please enter your email password:", "");
>> IdSMTP1->UserId = userID;
>> IdSMTP1->Password = userPword;
>
>I would suggest prompting the user BEFORE you connect to the server.
>
>> catch(...)
>
>Depending on your actual version of BCB, '...' may or may not handle VCL
>exceptions very well.  You should always catch VCL exceptions explicitally,
>ie:
>
>    catch(const Exception &e)
>
>>         exit(0);
>
>NEVER NEVER NEVER NEVER NEVER call exit() in a VCL project!!!!!  It does not
>allow the VCL to clean up after itself.  If you want the application to shut
>down, use Application->Terminate() instead, which posts a WM_QUIT message to
>the main message queue.
>
>
>Gambit
>
>
Technical Details
Message-ID: <42e6bf3e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42e67c8d$1@newsgroups.borland.com> <42e687dc$3@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,6759d34d895845ed
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Bud Manz" <amanz@northweststate.edu>
Sender: "Bud Manz" <amanz@northweststate.edu>
Reply-To: "Bud Manz" <amanz@northweststate.edu>
Subject: Re: Authenticate problem
Newsgroups: borland.public.cppbuilder.internet.socket
X-User-Info: 205.133.102.19     
References: <42e67c8d$1@newsgroups.borland.com> <42e687dc$3@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <42e6bf3e$1@newsgroups.borland.com>
Date: 26 Jul 2005 15:54:54 -0700
X-Trace: newsgroups.borland.com 1122418494 207.105.83.66 (26 Jul 2005 15:54:54 -0700)
Lines: 59
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail