RAD Studio VCL Reference
|
Creates an instance of an exception with a help-context ID and a simple message string that is loaded from the application's resources.
constructor CreateResHelp(Ident: Integer; AHelpContext: Integer); overload; constructor CreateResHelp(ResStringRec: PResStringRec; AHelpContext: Integer); overload;
__fastcall Exception(int Ident, int AHelpContext); __fastcall Exception(PResStringRec ResStringRec, int AHelpContext);
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);
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|