How to know why TIdPOP3 connection fails |
|
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
|
Re: How to know why TIdPOP3 connection fails |
|
"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
|