OnException occurs when an unhandled exception occurs in the application.
__property TExceptionEvent OnException;
Description
Use OnException to change the default behavior that occurs during an unhandled exception in the application.
Ivory Draw grabs the Application->OnException event handler and uses its own exeption handling mechanism. When an exception occurs, it first sets Active to false, then shows the message in a dialog box. Finally, it terminates the application. The termination is necessary, because once Active is set to false, all the Ivory Draw surfaces, palettes, and some other objects are released, so it wouldn't make sense to let the application cotinue running.
If you can't accept the default exception handler, feel free to write your own TIvoryDraw::OnException event handler. In this case, your own event handler is called instead of the default exception handler. But be careful, an unhandled exception in exclusive mode can be fatal. You must be absolutely sure what you're doing in your own exception handler. If you're not careful enough, the End Task command in the task manager may help, or, if nothing helps, you need to restart your computer. If you don't modify the default exception handler, then it's unlikely that you can cause such a fatal system breakdown.