Autor Beitrag
bbfan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: Mo 13.08.07 18:52 
Hallo!

Ich habe folgende Exception gebastelt:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
try
...
except
   on E: Exception do
     begin
     temp:=E.Message;
     addErr('ERR 3: '+temp+'->ACC: '+ ftp.Username);
     disconnect();
    end;
end;


Beim Debuggen führt er lediglich "temp:=E.Message" aus, den Rest ignoriert er... Was soll das denn?
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 13.08.07 19:04 
Moin!

Probier das mal so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
try
...
except
  addErr('ERR 3: '+Exception(ExceptObject).Message+'->ACC: '+ftp.Username);
  disconnect();
end;

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
dummzeuch
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 593
Erhaltene Danke: 5


Delphi 5 ent, Delphi 6 bis Delphi XE8 pro
BeitragVerfasst: Mo 13.08.07 21:37 
Hi,

user profile iconbbfan hat folgendes geschrieben:
Hallo!

Ich habe folgende Exception gebastelt:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
try
...
except
   on E: Exception do
     begin
     temp:=E.Message;
     addErr('ERR 3: '+temp+'->ACC: '+ ftp.Username);
     disconnect();
    end;
end;


Beim Debuggen führt er lediglich "temp:=E.Message" aus, den Rest ignoriert er... Was soll das denn?


Ist das da wirklich der Code, den du verwendest? Du hast nicht evtl. einfach das Begin/End vergessen?

twm
bbfan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: Mo 13.08.07 22:15 
das erster werde ich mal ausprobieren.

begin und end fehlen nicht...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 13.08.07 22:41 
Lass das ganze mal ohne Debugger laufen.
bbfan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: Mi 15.08.07 20:39 
Narses Lösung funktioniert:

Zitat:
Exception(ExceptObject).Message