Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.2k views
in .NET FTP by (120 points)
When the ftp client fails to connect the server,the program break at "throw;"
Can I remove the "throw" to solve this problem?

public virtual void Connect()
{
lock (clientLock)
{
bool loggedIn = false;
try
{
if (LocalDirectory==null)
LocalDirectory = Directory.GetCurrentDirectory();
if (ServerAddress == null)
throw new FTPException("ServerAddress not set");
OnConnecting();
ActiveClient.Connect();
log.Debug("Connected to " + ServerAddress + " (instance=" + instanceNumber + ")");
OnConnected(true);
loggedIn = PerformAutoLogin();
}
catch
{
OnConnected(IsConnected);
if (!IsConnected)
OnClosed();
throw;

}
if (loggedIn)
PostLogin();
}
}

Please log in or register to answer this question.

Categories

...