Autor Beitrag
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Mo 06.02.06 22:42 
Hallo!

Wie der Titeal schon sagt brauch ich nen Befehl / ne Eigenschaft oder was auch immer um einfach die Fehlermeldungen zu unterdrücken damit keine MessageBoxen kommen mit sowas wie 'Socket Error'...

Ich hoffe ihir wisst was ich meine

greetz

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 06.02.06 23:05 
Moin!

Klassisch:

a) Einen Error-Event-Handler anlegen und Error auf 0 setzen (einfach mal in die OH schauen, das steht da auch alles drin).

b) try-except-end Blöcke verwenden.

cu
Narses
Born-to-Frag Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Di 07.02.06 00:08 
Das Problem ist aber, dass ich das schon versucht habe und die Fehlermeldungen trotzdem noch bekomme:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.ClientSocket1Error(Sender: TObject; Socket: TCustomWinSocket;
  ErrorEvent: TErrorEvent; var ErrorCode: Integer);
begin
  ErrorCode := 0;
  if ClientSocket1.Active then
    ClientSocket1.Close;
end;


Was ist daran falsch?


greetz

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 07.02.06 00:11 
Moin!

In der IDE oder Standalone? Wenn in der IDE, dann mußt du die Option ausschalten, dass der Debugger bei Exceptions anhält.

cu
Narses
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: Di 07.02.06 00:27 
Oder die entsprechenden Typ in die Ignorier-Liste hinzufügen (Tools :arrow: Debugger-Optionen :arrow: Sprach-Exceptions)
Born-to-Frag Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Di 07.02.06 18:06 
user profile iconNarses hat folgendes geschrieben:
Moin!

In der IDE oder Standalone? Wenn in der IDE, dann mußt du die Option ausschalten, dass der Debugger bei Exceptions anhält.

cu
Narses


Standalone :? Ich weiß nicht mehr weiter warum das nicht funktioniert.



user profile iconUGrohne hat folgendes geschrieben:
Oder die entsprechenden Typ in die Ignorier-Liste hinzufügen (Tools :arrow: Debugger-Optionen :arrow: Sprach-Exceptions)


Wenn ich es Standalone laufen hab macht das aber keinen Unterschied, oder?


greetz

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
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: Di 07.02.06 19:07 
user profile iconBorn-to-Frag hat folgendes geschrieben:
Wenn ich es Standalone laufen hab macht das aber keinen Unterschied, oder?

Nein, da macht das keinen Unterschied, dann musst Du, wie anfangs schon gesagt wurde, try-except-Bloecke verwenden. Schon wenn Du nur das machst, gibt es keine Fehlermeldungen mehr, aber Du solltest diese auch im except-Teil behandeln, so bemerkst Du sie vll. selbst nicht mehr ;)
Born-to-Frag Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Di 07.02.06 23:09 
user profile iconUGrohne hat folgendes geschrieben:
user profile iconBorn-to-Frag hat folgendes geschrieben:
Wenn ich es Standalone laufen hab macht das aber keinen Unterschied, oder?

Nein, da macht das keinen Unterschied, dann musst Du, wie anfangs schon gesagt wurde, try-except-Bloecke verwenden. Schon wenn Du nur das machst, gibt es keine Fehlermeldungen mehr, aber Du solltest diese auch im except-Teil behandeln, so bemerkst Du sie vll. selbst nicht mehr ;)


Ok, habs nun mit try - except blöcken gelöst. Danke ;)


greetz

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.