Bonjour,
Besoin de conseil sur le code suivant:
Si la condition est vrai est que le "raise Exception.Create" est activé, ou va ensuite le pointeur de programme ?
Après le "end" du finally ?
cordialement
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 try //finally try //except if condition=true then raise Exception.Create('Erreur xxxx'); except on EvariantTypecastError do begin if ibtransaction1.InTransaction=true then IBTransaction1.Rollback; showmessage('Erreur convertion de données ligne'); end; on E: Exception do begin if ibtransaction1.InTransaction=true then IBTransaction1.Rollback; showmessage(E.ClassName + ': '+ E.Message); end; else begin if ibtransaction1.InTransaction=true then IBTransaction1.Rollback; end; end; //fin except finally end; //fin finally
Partager