Autor Beitrag
Lunzen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29



BeitragVerfasst: Mo 29.07.02 21:19 
muss in meinem prog noch eine fehlerbehandlung einbauen .. würde mich freuen wenn mir da wer helfen könnte ..
icq: 152671412

großes danke im voraus

lunzen
hitstec
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 295



BeitragVerfasst: Mo 29.07.02 22:27 
habe kein ICQ, aber versuchs do damit

ausblenden Quelltext
1:
2:
3:
4:
5:
try
  ..dein Code..
except
  ..im Fehlerfall Fehlermeldung..
end;
Frankle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20



BeitragVerfasst: Di 30.07.02 13:45 
Titel: fehler
Hi....dann kannst du noch auf bestimmte Fehler eingehen
ausblenden Quelltext
1:
2:
3:
4:
5:
try 
 Anweisung
except
 onEConvertError do Anweisung
end;


oder eben try-finally

_________________
---------------------------
God Safe QUEEN
"The Show Must Go On"
lemming
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 470

Mac OS 10.3.1
Delphi 6 Pro, Kylix 3
BeitragVerfasst: Di 30.07.02 13:56 
Oder wenn du generell keine Messageboxen in deinem Programm haben willst und du dir denkst "Hach, ich pfeif auf Error Messageboxen"

Dann ist daß das richtige für dich:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TMain.FormShow(Sender: TObject);
begin
  Application.OnException := Main.OnError;
end;

procedure TMain.OnError(Sender: TObject; E: Exception);
begin
  LabelError.Caption := E.Message;
end;
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Di 30.07.02 16:18 
Hallo lemming,

kommen die Exeptions da auch ann, wenn sie Lokal gekapzelt sind?
Wahrscheinlich nicht oder? Ansonsten währe das eine Interessante Sache für ErrorLogs.

Gruß
Klabautermann
Alfons-G
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 307

Win XP Prof, Linux, Win 7
D5 Prof, D7 Architect, D2005 Architect, D2007 Architect
BeitragVerfasst: Di 30.07.02 16:35 
Nö, auf diese Art kannst Du nur Fehler behandeln, welche nicht vorher bearbeitet wurden. Du kannst aber auch mit raise eine Fehlerauslösung erzwingen. Schau mal in der Object-Pascal-Hilfe zu diesem Thema nach.

:idea:

_________________
Alfons Grünewald
Lunzen Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29



BeitragVerfasst: Di 30.07.02 18:33 
danke danke leutz ... 8)