You can attach an event handler to Application.OnExceptionand handle any unhandled exception.
Depending on the version of Delphi you may
- attach and implement the entire event handler in the code in your main form, dpr or wherever you are in the form
Application.OnException := DoApplicationException. - remove the component
TApplicationEventsin your main form, double-click the OnException event and implement your code.
source
share