verifying valid connection

so we had the recieving connecion change the passoerd on on us and the app just crashed with no explatination in the com exception. how do we confirm at connection time that the connection was sucessful. I need to trap this specific error.

Here is a suggestion for the next release the .Connect() should return bool as a quick test so you could use it like this
if(!sftp..Connect()) do something as I didn't connect
Just a thought.

So is this the right way to check connection status after a connect
_ftp.Connect();
if (_ftp.ConnectionStatus == ConnectionStatus.ftpConnectionStatusConnected)isConnected = true

_sftp.Connect();
if (_sftp.LastStatusCode == enumSFTPStatus.ftpSFTPStatusOk) isConnected = true;