In this post, you’ll learn how the HandleException method, also known as DelphiVCL.Application.HandleException, works. It’s used to provide the application with default exception handling. If an exception passes through all the try blocks in the application code, the application automatically calls HandleException, which displays a dialog box indicating an error has occurred. Unless the exception object is EAbort, HandleException calls the OnException event handler, if one exists. Otherwise, it calls ShowException to display a message dialog box indicating an error has occurred.
To assign other exception handling codes for the application, use the OnException event handler. Learning more about the HandleException method will help you build a Python project more easily in the future with Delphi VCL Applications.
Table of Contents
What are the properties and methods of DelphiVCL.Application.HandleException?
Let’s browse all the properties and methods of the DelphiVCL.Application.HandleException using dir() command:
1 2 3 |
import DelphiVCL dir(DelphiVCL.Application.HandleException) |
See the responses in our Windows command prompt:
You can also read short information about the DelphiVCL.Application.HandleException using the print() command:
1 2 |
print(DelphiVCL.Application.HandleException) print(DelphiVCL.Application.HandleException.__doc__) |
See the responses in our Windows command prompt:
Check out DelphiVCL which easily allows you to build GUIs for Windows using Python.