System.SysUtils.EInOutError.CreateRes
Delphi
constructor CreateRes(ResStringRec: PResStringRec; const Path: string); overload;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | public | System.SysUtils.pas | System.SysUtils | EInOutError |
Description
Creates an instance of an exception with a simple message string that is loaded from the application's resources.
System.SysUtils.EInOutError.CreateRes inherits from System.SysUtils.Exception.CreateRes. All content below this line refers to System.SysUtils.Exception.CreateRes.
Creates an instance of an exception with a simple message string that is loaded from the application's resources.
Call CreateRes to construct an exception with 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, CreateRes creates an empty message string for the exception.
ResStringRec is a pointer to a resource string. This syntax appears as follows:
resourcestring sMyNewErrorMessage = 'You shouldn''t have done that';
...
Exception.Create(@sMyNewErrorMessage);