title: TIdFTP Error Handling in Delphi (Indy 10)
body: <p>Can anyone explain to me how to handle errors with <code>TIdFTP</code>?</p>
  
  <p>For example, I try to connect as follows ...</p>
  
  <pre><code>with IdFTP do
  begin
    Username := xxxxx;
    Password := '1000';
    Host := xxx.xxx.xxx.xxx;
    Port := 21;
    ConnectTimeOut := 5000;
    try
      Connect;
    except
      On E: Exception do
        ShowMessage(E.Message);
    end;
  end;
  </code></pre>
  
  <p>If I use the wrong password (as I have deliberately done in the above example to simulate what might happen if a user provides the wrong password), I get the error "Bad sequence of commands".  That tells me nothing about the real problem.  Is there any way to get a meaningful description of the actual error, ie: that the password is incorrect?</p>