Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
prog:lazarus:classes:exceptions [07/05/2021 11:58] thierry [Exceptions] |
prog:lazarus:classes:exceptions [13/05/2021 15:37] (Version actuelle) thierry [Application.CaptureException] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Exception ====== | + | ====== Exception & Erreurs====== |
+ | ===== La class ===== | ||
+ | <code delphi> | ||
+ | Exception = class(TObject) | ||
+ | public | ||
+ | constructor Create(const msg : string); | ||
+ | constructor CreateFmt(const msg : string; const args : array of const); | ||
+ | constructor CreateRes(ResString: PString); | ||
+ | constructor CreateResFmt(ResString: PString; const Args: array of const); | ||
+ | constructor CreateHelp(const Msg: string; AHelpContext: Longint); | ||
+ | constructor CreateFmtHelp(const Msg: string; const Args: array of const; | ||
+ | AHelpContext: Longint); | ||
+ | constructor CreateResHelp(ResString: PString; AHelpContext: Longint); | ||
+ | constructor CreateResFmtHelp(ResString: PString; const Args: array of const; | ||
+ | AHelpContext: Longint); | ||
+ | Function ToString : String; override; | ||
+ | property HelpContext : longint read fhelpcontext write fhelpcontext; | ||
+ | property Message : string read fmessage write fmessage; | ||
+ | end; | ||
+ | </code> | ||
===== Déclencher une Exception ===== | ===== Déclencher une Exception ===== | ||
<code delphi> | <code delphi> | ||
Ligne 35: | Ligne 55: | ||
end; | end; | ||
</code> | </code> | ||
+ | ===== Liste des erreurs Windows ===== | ||
+ | La liste des erreurs Windows se trouve dans le fichier ''...\fpcsrc\rtl\win\wininc\errors.inc'' | ||