Mega Search
23.2 Million


Sign Up

Make a donation  
How to know why TIdPOP3 connection fails  
News Group: borland.public.cppbuilder.internet.socket

I'm using TIdPOP3 with Indy 9.0.17 and BCB5. The connection goes fine on 
my tests, but I expect connection problems when the customers configure 
the server, user name, etc. I would like to add a diagnostic, like 
"Unresolvable host", "Server not responding" or "Password invalid", so I 
read the manual to no avail. I've been reading the source code trying to 
find if the exception generated by Connect() gives this information, but 
I got lost.

Please, tell me if it's possible to get this information somehow.

TIA
Miguel Gimenez

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 4-Dec-2007, at 11:14 PM EST
From: Miguel Gimenez
 
Re: How to know why TIdPOP3 connection fails  
News Group: borland.public.cppbuilder.internet.socket
"Miguel Gimenez"  wrote in message 
news:4755d150@newsgroups.borland.com...

> Please, tell me if it's possible to get this information somehow.

If an error occurs, an exception is thrown.  Different types of exceptions 
are thrown for different types of errors, but they all have a Message 
property.  Simply include that property value, and perhaps also the class 
name of the exception, in your diagnostic.


Gambit 



Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 4-Dec-2007, at 2:48 PM EST
From: Remy Lebeau \(TeamB\)