System.SysUtils.Exception.CreateResHelp
Delphi
constructor CreateResHelp(Ident: NativeUInt; AHelpContext: Integer); overload;
constructor CreateResHelp(ResStringRec: PResStringRec; AHelpContext: Integer); {$IFNDEF NEXTGEN} overload; {$ENDIF !NEXTGEN}
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | public | System.SysUtils.pas | System.SysUtils | Exception |
Description
Creates an instance of an exception with a help-context ID and a simple message string that is loaded from the application's resources.
Call CreateResHelp to construct an exception with a help-context ID and a simple message string loaded from an application's resources. Resources are bound into the application executable at compile time, but at design time they exist in a separate resource file.
Ident is the unique ID of the resource as specified in the resource file. If Ident is not a valid resource ID, CreateResHelp creates an empty message string for the exception.
AHelpContext is an integer that specifies the context-sensitive help ID for the exception.
ResStringRec is a pointer to a resource string. Its syntax appears as follows:
resourcestring sMyNewErrorMessage = 'You shouldn''t have done that';
const IDH_MYNEWERROR: Integer = 30000;
...
Exception.Create(@sMyNewErrorMessage, IDH_MYNEWERROR);