After I added my method to the FTPConnection.Error event I disabled my network connection.
Off course when trying to .Connect() there was an error.
But instead of firing this .Error event, an exception was thrown containing the standard winsock exception message.
"The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for"
This is off course not the desired behaviour.
I can catch this by wrapping the connect method in a try catch, but I guess I have to do this with every method I call then.
Wouldn't it be better if this was handled in the library.
Something like this:
if(Error == null){
throw theException;
}
Error(theException);
Or am I missing something here?