Vcl.Edge.EEdgeError.CreateRes

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

constructor CreateRes(ResStringRec: PResStringRec; ErrorCode: HRESULT);

Properties

Type Visibility Source Unit Parent
constructor public Vcl.Edge.pas Vcl.Edge EEdgeError

Description

Creates an instance of an exception with a simple message string that is loaded from the application's resources.

Vcl.Edge.EEdgeError.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);



See Also