Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
prog:lazarus:classes:tapplication [07/05/2021 12:01] thierry créée |
prog:lazarus:classes:tapplication [07/05/2021 12:04] (Version actuelle) thierry [CaptureException] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== TApplication ====== | ====== TApplication ====== | ||
+ | ===== CaptureException ===== | ||
+ | Apparement TApplication aurait une property [[https://lazarus-ccr.sourceforge.io/docs/lcl/forms/tapplication.captureexceptions.html|CaptureException]] (public) pour gérer les exceptions.... a creuser. | ||
+ | <code delphi> | ||
+ | procedure TApplication.RunLoop; | ||
+ | begin | ||
+ | repeat | ||
+ | if CaptureExceptions then | ||
+ | try // run with try..except | ||
+ | HandleMessage; | ||
+ | except | ||
+ | HandleException(Self); | ||
+ | end | ||
+ | else | ||
+ | HandleMessage; // run without try..except | ||
+ | until Terminated; | ||
+ | end; | ||
+ | </code> | ||
+ | ====== Sources & Ressources ====== | ||
+ | * [[https://lazarus-ccr.sourceforge.io/docs/lcl/forms/tapplication.html]] | ||
+ | |||