Autor Beitrag
Co
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27

WinXP, SUSE Linux 9.0
Delphi 5.0 Standard
BeitragVerfasst: So 21.08.05 16:33 
Kann man irgendwie verhindern dass der Debugger (bestimmte) Exceptions ausgibt (z.B. durch Compilerschalter o.Ä.)? Das tut er nämlich selbst dann wenn das Programm die Exception bereits selbst behandelt und auf die Dauer nervt das ziemlich.

Konkretes Beispiel: Eine Editbox soll während der Eingabe die Farbe wechseln wenn der Inhalt keine Zahl ist:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
xxx.edit1change(sender: tobject);
begin
  try 
    myvar := inttostr(edit1.text);
  except
    edit1.font.color := clred;
  end;
end;
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 21.08.05 16:56 
Du kannst in den Debugger Optionen deaktivieren, dass er beim Debuggen bei den Delphi Exceptions anhalten soll.
Co Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27

WinXP, SUSE Linux 9.0
Delphi 5.0 Standard
BeitragVerfasst: Mo 22.08.05 11:06 
Danke, klappt jetzt :wink:
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Mo 22.08.05 11:14 
Hallo!

Hier und hier wurde vor nicht allzu langer Zeit das Thema besprochen bzw. angeschnitten.

Um´s kurz zu machen: Nimm StrToIntDef zur Prüfung oder schreibe dir eine eigene Prüfroutine für Integerzahlen. Das Abschalten des Debugger-Stops wird man früher oder später bereuen.

Cu,
Udontknow