Rx Expect

RX Library

Control Name Unit Class
RX BDE Items DBExcpt TRxBdeErrorDlg

Description:
The class TRxBdeErrorDlg replaces the normal message box for EDBEngineError exceptions raised at runtime.

The standard message box displayed by an unhandled exception shows only the exception's name and description. EDBEngineError exceptions, however, contain additional information that can be useful to application developers. For this reason, exceptions of the EDBEngineError class, appear in a special dialog box called TRxBdeErrorDlg. The dialog shows the entire stack of BDE errors as represented in the EDBEngineError object.

You can use the DbErrorIntercept procedure to display TRxBdeErrorDlg instead standard message box. This can be useful for debugging or in cases where you want the end user to have access to BDE error information.

You can also specify handler of OnErrorMsg event to change text of error message displayed by TRxBdeErrorDlg, and help context for error dialog by using DbErrorHelpCtx variable.


Event OnErrorMsg
Declaration: OnErrorMsg: TDBErrorEvent;

Use OnErrorMsg to perform special processing when the error message is shown. You can, for example, change the text of error message by using Msg parameter.


Const DbErrorHelpCtx
Declaration: DbErrorHelpCtx: THelpContext = 0;

The DbErrorHelpCtx variable is an integer value that determines which Help screen appears when the user requests context-sensitive online Help from the TRxBdeErrorDlg dialog by pressing "F1" key..


Type TDBErrorEvent
Declaration: TDBErrorEvent = procedure (Error: TDBError; var Msg: string) of object;

TDBErrorEvent is the type of the OnErrorMsg event of the TRxBdeErrorDlg dialog control.


Routine DbErrorIntercept
Declaration: procedure DbErrorIntercept;

DbErrorIntercept enables the TRxBdeErrorDlg instance, replacing the standard exception message for BDE errors at runtime.

DbErrorIntercept example:
You can call the DbErrorIntercept procedure in the body of your project file (.DPR):

begin
__Application.Title := 'My Application';
__DbErrorIntercept;
__Application.CreateForm(TMainForm, MainForm);
__Application.CreateForm(...);
__...
__Application.Run;
end;


Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000