RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDbEngineErrorDlg.HookExceptions Method

Enables the TDbEngineErrorDlg instance, replacing the standard exception message at runtime.

Pascal
procedure HookExceptions;
C++
__fastcall HookExceptions();

To display all unhandled EDBEngineError exceptions in a TDbEngineErrorDlg (rather than the standard message box), create a TDbEngineErrorDlg and call HookExceptions to enable it:

TDbEngineErrorDlg.Create(Application).HookExceptions;

 

TDbEngineErrorDlg *pDBEDlg = new TDbEngineErrorDlg (Application);
pDBEDlg->HookExceptions();

If you include this code in an application's project file, in an OnCreate event handler, or the constructor for the project's main form, the TDbEngineErrorDlg will trap and display unhandled EDBEngineError exceptions at runtime. 

 

EDbEngineError 

ShowException

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!