Autor Beitrag
JRegier
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Do 30.06.05 10:22 
Hallo, ich versuche mit ZConnection zu Connecten und habe dabei die Connect Anweisung in try except Block gelegt
aber es wird kein Exception ausgelöst!

Also Programm bleibt hängen und wenn ich es im Taskmanager beende dann meldet mir Delphi das eine Exception aufgetreten ist weil keine Verbindung zur IP Adresse aufgenommen werden konnte! Ich mache ein Test mit und ohne Delphi und in beiden Fällen bleibt das Programm hängen! Ich habe auch ein Timeout gesetzt, was kann ich den noch tun?
direction4delphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Do 30.06.05 10:58 
Hi

Dieser Code funktioniert bei mir ohne probs

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Button3Click(Sender: TObject);
begin
try
ZConnection1.Connect;
except
showMessage('Leider nicht');
end;
end;


mfg
MILLI
JRegier Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Do 30.06.05 11:55 
user profile icondirection4delphi hat folgendes geschrieben:
Hi

Dieser Code funktioniert bei mir ohne probs

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Button3Click(Sender: TObject);
begin
try
ZConnection1.Connect;
except
showMessage('Leider nicht');
end;
end;


mfg
MILLI


Aber ´ja doch, ich weiß doch wie! Aber das Programm bleibt hängen! Und zwar wenn ich es Anhalte in Delphi
dann zeigt er mir in ZConnection.pas das zum Server nicht verbunden werden konnte. Exception!
Aber zur Laufzeit ohne Delphi sollte er ja auch die Meldung ausgeben die nach Except kommt aber leider
nicht! Programm bleibt hängen!
KidPaddle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 351

WinXP,Linux
D7 Prof, XE7
BeitragVerfasst: Do 30.06.05 12:06 
Dann wird die Exception vor deinem except - Abschnitt abgefangen. In der Delphi IDE die Exception auftretten lassen und dann mit F11 (Debuger - Einzelschritt) ansehen, wo die Exception verarbeitet wird. Wahrscheinlich wird diese dann irgendwo verarbeitet und der Status auf nicht Connected gesetzt.

Gruß
KidPaddle
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 30.06.05 12:13 
F11???
Du meinst wohl F7, DAS ist Einzelschritt! :lol:
F11 ist der Objektinspektor...

Gibts bei der Connection vielleicht ein onError? Wie bei den Indys, nur eben nicht fürs Internet? Da wird die Exception an diese Routine weitergeleitet, falls vorhanden.
ManuelGS
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 173

Win XP HE, Suse Linux
D6, D7, D2005 Personal
BeitragVerfasst: Do 30.06.05 12:15 
nicht böse sein, aber hast du überhaupt die fehlerkontrolle für dein programm aktiviert? da gibts nämlich so ein häkchen...

_________________
"Leben ist gänzlich Bühne und Spiel; so lerne denn spielen
und entsage dem Ernst - oder erdulde das Leid." - Palladas von Alexandria
JRegier Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Do 30.06.05 14:09 
user profile iconManuelGS hat folgendes geschrieben:
nicht böse sein, aber hast du überhaupt die fehlerkontrolle für dein programm aktiviert? da gibts nämlich so ein häkchen...


Schreibe doch bitte wo das Häckchen zu finden ist? Meinst vieleicht integrierte Fehlersuche unter Tools Debuger Optionen? Ich habe ein wenig was geändert! Früher hatte ich nicht diese Problemme! Aber jetzt zeigt er mir manchmal
Interner Fehler ! Kann es sein das ich Delphi neu Installieren muß? Das hat mir einer mal geschrieben!


Also das mit OnError seh ich mir an! Und danke Leute für Eure Hilfe!

//EDIT

On Error gibts nicht!