Autor Beitrag
Mandi Nice
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win2K, XP, CE
Delphi 2006 Prof.
BeitragVerfasst: Mo 27.07.09 12:33 
Hallöchen

Code nach try except wird nur nach einem Fehler ausgeführt.

Code nach try finally wird auch nach einem Fehler ausgeführt.


Wie kann ich das mischen ?

Also es soll nach einem Fehler ein bestimmer Code ausgeführt werden, um den Fehler zu behandeln.
Es soll aber auch Code geben der immer ( auch bei Fehler ) ausgeführt wird um die Funktions abzuschliessen ( z.B.: Dateien zu schliessen )

Ich komme dabei nicht so richtig drauf ??

Danke Euch.

hmg
Mandi
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mo 27.07.09 12:38 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
try
    try
        //Kot
    except
        //Fehlerbehandlung
    end;
finally
    //Ressourcenschutz
end;

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Mandi Nice Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win2K, XP, CE
Delphi 2006 Prof.
BeitragVerfasst: Sa 01.08.09 20:38 
Hallöchen

Danke.

An die einfachsten Sachen denkt man nicht :-(

hmg
Mandi