Autor Beitrag
Pyr0cracker
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 164

Win XP, Ubuntu 8.04, openSUSE 11.0
Delphi 7 Personal
BeitragVerfasst: Di 18.03.03 19:23 
hi, wie kann ich die fehlermeldung abfangen, die kommt wenn ich mit der idftp1 compo eine verbindung herstellen möchte und keine internetverbindung vorhanden ist(bzw. der server nicht erreichbar ist)

ciao
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Di 18.03.03 21:04 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
try
 idFtp1.Connect;
 Label1.Caption:='Client verbunden';
except
 Label1.Caption:='Server nicht bereit';
 exit;
end;

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
Pyr0cracker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 164

Win XP, Ubuntu 8.04, openSUSE 11.0
Delphi 7 Personal
BeitragVerfasst: Do 20.03.03 14:29 
hab ich schon mit exept und finally probiert, geht aber nicht. Fehlermeldung in blabla, socket-error host not found...
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Do 20.03.03 20:15 
Auf während der Laufzeit?

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
Pyr0cracker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 164

Win XP, Ubuntu 8.04, openSUSE 11.0
Delphi 7 Personal
BeitragVerfasst: Do 20.03.03 20:54 
geht auch nicht :cry:
der fehler :
ausblenden Quelltext
1:
2:
Socket Error # 11001
Host not found.

und der quellcode:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
        idFTP1.Host:= 'www.lesta.de';
        idFTP1.Username:= 'dorian';
        idFTP1.Password:= 'd78m';
        try
            idFTP1.Connect(true);
            idFTP1.ChangeDir('htmlseiten/meinesachen/gbd');
            idFTP1.Put(inipfad+ininame+'.gbd', ininame+'.gbd', false);
        finally
            idFTP1.Disconnect;
            systemmeldungen.lines.add('Fehler beim Speichern von "'+ininame+'gbd".');
        end;


Zuletzt bearbeitet von Pyr0cracker am Fr 21.03.03 10:57, insgesamt 1-mal bearbeitet
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Do 20.03.03 21:25 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
 
        idFTP1.Host:= 'www.lesta.de'; 
        idFTP1.Username:= 'dorian'; 
        idFTP1.Password:= 'd87n'; 
        try 
            idFTP1.Connect(true); 
            idFTP1.ChangeDir('htmlseiten/meinesachen/gbd'); 
            idFTP1.Put(inipfad+ininame+'.gbd', ininame+'.gbd', false); 
        except
            idFTP1.Disconnect; 
            systemmeldungen.lines.add('Fehler beim Speichern von "'+ininame+'gbd".'); 
        end;

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
Pyr0cracker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 164

Win XP, Ubuntu 8.04, openSUSE 11.0
Delphi 7 Personal
BeitragVerfasst: Fr 21.03.03 10:57 
wie schon gesagt, hab ich auch schon mit except probiert.
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Fr 21.03.03 12:50 
Das ist anormal! Tut mir leid, dann weiß ich auch net weiter!

maxk :ziehtsichzurück:

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Fr 21.03.03 22:22 
maxk hat folgendes geschrieben:
Auf während der Laufzeit?
Eine Idee noch:
Tritt das Problem auch auf, wenn du die Datei direkt unter Windows ausführst und nicht unter Delphi?

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
Shadowdragon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 143

Win 2000
Delphi 6 Pers., Delphi 7
BeitragVerfasst: So 23.03.03 14:38 
Mach ma den Debugger aus, und überprüfe notfalls das Ziel..... wenns den Server nicht findet...

Hier noch ne Idee...

ausblenden Quelltext
1:
2:
3:
4:
5:
try 
(...) //code hier rein
except on e: Exception do
    showmessage ('Fehler') //oder so....
end


Damit MUSS es einfach gehen, weil das einfach stur jede Fehlermeldng abfängt....

wenn das nicht geht, weiss ich auch nicht.

_________________
Ein Programm gleicht dem Prinzip von Jenga:
Viele Bestandteile, wird nach oben hin immer besser, nach unten hin immer instabiler und wenn man was falsch macht klappt der ganze Mist zusammen.
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Mo 24.03.03 14:29 
try...except..end ist ja das was dieser maxk sagte... 8)

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
Shadowdragon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 143

Win 2000
Delphi 6 Pers., Delphi 7
BeitragVerfasst: Mo 24.03.03 17:29 
Ja, klar, aber du hast das speziell für einen Fehlertyp angegeben, aber mein Beispeil reagiert auf *jede* Meldung ;)

*bin halt besser* :D :D

Nee, aber sonst weiss ich auch nicht weiter...

_________________
Ein Programm gleicht dem Prinzip von Jenga:
Viele Bestandteile, wird nach oben hin immer besser, nach unten hin immer instabiler und wenn man was falsch macht klappt der ganze Mist zusammen.