Autor Beitrag
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: So 09.11.03 11:46 
Hi!

Hab mal was von ner Möglichkeit gehört, beim Delphi-Debugger bestimmte Exception-Klassen zu definieren, bei denen er das Programm dann nicht unterbricht (also so, wie beim fertigen Programm die try..except bzw. try..finally Blöcke wirken)... und die Option such ich grad irgendwie vergebens :( kann mir jemand helfen? wo iss'n die? oder gibts die gar net?
Ich will die "Connection Closed Gracefully"s von indy abfangen... die nerven!



MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems


Zuletzt bearbeitet von MrSaint am Mo 10.11.03 14:59, insgesamt 1-mal bearbeitet
barfuesser
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 324



BeitragVerfasst: Mo 10.11.03 10:47 
Tools->Debugger-Optionen->Sprach-Exceptions

barfuesser
MrSaint Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Mo 10.11.03 14:58 
aaahhh! Super! Danke!!!!


:D :D :D



MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
Amun
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

XP Home ;(((
D6 Pers
BeitragVerfasst: Mi 08.09.04 13:14 
MrSaint hat folgendes geschrieben:

(also so, wie beim fertigen Programm die try..except bzw. try..finally Blöcke wirken
MrSaint


was muss ich denn da bei Sprach-Exeptions einfügen???
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Mi 08.09.04 13:28 
Versuchs mal mit EIDConnClosedGraceFully, so stehts bei mir im Delphi aber schon automatisch drin.
Amun
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

XP Home ;(((
D6 Pers
BeitragVerfasst: Mi 08.09.04 13:35 
nope so gehts leider net...
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Mi 08.09.04 13:40 
Laut Indy-Hilfe sollte man auch

EIdSilentException

ignorieren, dazu gehört Closed Gracefully nämlich. Probiers mal damit
Amun
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

XP Home ;(((
D6 Pers
BeitragVerfasst: Mi 08.09.04 13:46 
www.geocities.com/da.../BildaZ/METZEL_2.JPG

so hab ich es...

ist da noch was falsch ich habe bei EIdSilentException
auch schon mal den haken raus genommen auch kein erfolg...

pls help...

Moderiert von user profile iconChristian S.: Img- in Url-Tags geändert
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Mi 08.09.04 13:47 
Naja, Du solltest natürlich auch die Integrierte Fehlersuche aktivieren *g*
Amun
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

XP Home ;(((
D6 Pers
BeitragVerfasst: Mi 08.09.04 13:49 
ja die hatte ich auch schon drin !

bringt alles nichts...
kommt immer wieder dieser fehler...
Amun
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

XP Home ;(((
D6 Pers
BeitragVerfasst: Mi 08.09.04 14:17 
IdFTP1.List(DirectoryListBox1.Items);

ich will die ordner und so in einer listbox ausgeben...

so ...


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
procedure TForm1.Button1Click(Sender: TObject);
begin
   IdFTP1.Connect();

end;

procedure TForm1.IdFTP1Connected(Sender: TObject);
begin
  ShowMessage('Connect');
   IdFTP1.List(DirectoryListBox1.Items); 
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
IdFTP1.Quit;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
Form1.Close;
end;

procedure TForm1.DirectoryListBox1Change(Sender: TObject);
begin

end;


wenn ich diesen befehl IdFTP1.List(DirectoryListBox1.Items);
wo anders hin mache dann geht gar nichts mehr nachdem ich auf verbinden geklickt habe und nach ca 12 sekunden kommt der gleiche fehler...
sonst kommt er immer sofort...
Moderiert von user profile iconUGrohne: Code- durch Delphi-Tags ersetzt.
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Do 09.09.04 10:43 
Du hast Username, Passwort, Host und Port korrekt angegeben? Ist der Server wirklich erreichbar (Test mit anderem Client). Prüfe vor dem Ausführen eines Befehls auf dem Server auch, ob er wirklich connected ist (IdFTP1.Connected)
Amun
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

XP Home ;(((
D6 Pers
BeitragVerfasst: Do 09.09.04 11:16 
ja er gibt mir ne nachtricht das er connectet ist!
hab ich so eingefügt

ganz simpel showMassage('connected')

und direkt danach kommt die fehlermeldung!


PW IP Proxy benutzer ist alles richtig...
Amun
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

XP Home ;(((
D6 Pers
BeitragVerfasst: Do 09.09.04 11:20 
procedure TForm1.IdFTP1Connected(Sender: TObject);
begin
ShowMessage('Connect');

end;

und die zeigt er mir noch und dann kommt der fehler dann kan ja nichts falsch sein
an der IP PW usw oder?
MrSaint Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Do 09.09.04 11:28 
probiers mal so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
if IdFTP1.Connected then
  IdFTP1.List(DirectoryListBox1.Items)
else
  showmessage('Not connected :(');



MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
Amun
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

XP Home ;(((
D6 Pers
BeitragVerfasst: Do 09.09.04 11:46 
dann kommt sofort die nachricht

connection closed Gracefully.....



**** man das kanns doch net sein!

und wie du oben schon entnehmen kannst habe ich bei sprach-exceptions auch schon
die wichtigen sachen drinne
Amun
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

XP Home ;(((
D6 Pers
BeitragVerfasst: Do 09.09.04 11:51 
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
   IdFTP1.Connect();

end;

procedure TForm1.IdFTP1Connected(Sender: TObject);
begin
  if IdFTP1.Connected then
  IdFTP1.List(DirectoryListBox1.Items)
else
  showmessage('Not connected ');


end;

procedure TForm1.Button2Click(Sender: TObject);
begin
IdFTP1.Quit;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
Form1.Close;
end;

end.


so meinst das doch oder?
MrSaint Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Do 09.09.04 15:11 
Also ich habs grad vrsucht nachzubauen, aber leider spinnt das hier alles komplett.. der liefert mit "FTP Server. Server ready" als Fehler zurück und ich bekomm ne Exception... naja, egal, net so wichtig..
Auf jeden fall sollte es so gehen, wie du das da hast.

Für das Connction closed gracefully lies mal hier: www.swissdelphicente...showarticle.php?id=1 laut dem musst du beim Debugger _nur_ das EIdSilentException einbauen, nicht aber auch noch das EIdConnClosedGracefully!

Wo bekommst du denn die Exception? Ich kann mich nämlich schwach dran erinnern, dass ich auch mal ne Exception im Indy-Code bekommen hab (ich glaub es war sogar ne connection closed gracefully).. da stand dann komentar dabei, was man tun sollte (alsi im indy-code!)... einfach mal bissl guggn...


MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
Amun
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

XP Home ;(((
D6 Pers
BeitragVerfasst: Fr 10.09.04 09:21 
danke habe die lösung von wem bekommen aber wirklich dickes respekt
das ihr so hartnäckig an mir dran geblieben seit!!!

ich denke ich werde noch öffters hier sein!

Mfg Amun
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Fr 10.09.04 09:29 
Schreib doch dann bitte auch noch, wie Du es gelöst hast