Einzelnen Beitrag anzeigen

Hedge

Registriert seit: 30. Jun 2007
278 Beiträge
 
Delphi 2009 Professional
 
#4

Re: TDownloadURL Fehler abfangen?

  Alt 21. Nov 2009, 13:23
Das Problem ist dass überhaupt keine Exceptions geworfen werden.

Ich wollte mir erstmal ansehen was so für Exceptions auftreten können:

Delphi-Quellcode:
var
  RemotePath: String;
  Download:TDownloadURL;
begin
  downloadfilename:=fileName;
  RemotePath:='http://localhost/download/';
  Download:=TDownloadURL.Create(self);
  Download.URL:=RemotePath+filename;
  Download.Filename:=ExtractFilePath(Application.ExeName)+fileName;
  Download.OnDownloadProgress:=URL_OnDownloadProgress;
  try
    Download.ExecuteTarget(nil);
  except
    on E:Exception do
     ShowMessage(E.Message);
  end;
Leider kommt es nie zu einer Exception.
٩๏̯͡๏)۶
  Mit Zitat antworten Zitat