Raising exception at MakeDirectory on FTPServer.

Giganews Newsgroups
Subject: Raising exception at MakeDirectory on FTPServer.
Posted by:  Alpha and Omega (lame@nomail.nospam)
Date: Wed, 28 Jan 2004

Hi
I'm using Indy 9 FTP Server Compound.
When I raise exception at MakeDirectory at below ways, the connection will
close.
Any solution?
Here's my code.
Thx in advance.
--
procedure TServerForm.FTPServerMakeDirectory(ASender: TIdFTPServerThread;
  var VDirectory: String);
begin
    MkDir(Copy(VDirectory, 9, Length(VDirectory) - 7));//With {$I+}, it
should raise exception itself.
    //I use this code with {$I-} but the connection closes at both case.
    {if IOResult <> 0 then
    begin
      raise Exception.Create('Wahaha permission denied.');
    end; }
end;
--
Have a nice day.

Replies