From RAD Studio API Documentation
Jump to: navigation, search


constructor CreateRes(Ident: NativeUInt); overload;
constructor CreateRes(ResStringRec: PResStringRec); {$IFNDEF NEXTGEN} overload; {$ENDIF !NEXTGEN}


Type Visibility Source Unit Parent
constructor public System.SysUtils.pas System.SysUtils Exception


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';

See Also