In addition to displaying the exception message, which happens <br>by default, the following code shuts down the application when a <br>VCL exception is not caught and handled.<br><br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br> Application.OnException := AppException;<br><br>end;<br><br>procedure TForm1.AppException(Sender: TObject; E: Exception);<br><br>begin<br> Application.ShowException(E);<br> Application.Terminate;<br>end;