diff --git a/lcl/include/application.inc b/lcl/include/application.inc index 081dd8974b..8b36128059 100644 --- a/lcl/include/application.inc +++ b/lcl/include/application.inc @@ -869,7 +869,7 @@ begin DebugLn('TApplication.HandleException: ', 'there was another exception during showing the first exception'); HaltingProgram:=true; - //DumpExceptionBackTrace; + DumpExceptionBackTrace; Halt; end; Include(FFlags,AppHandlingException); diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index d51c5244a9..da29df03ac 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -1894,7 +1894,11 @@ begin which will wait for new messages. Under Win32 there is always a next message, so it works there. The LCL is OS independent, and so it uses a better way: } - WidgetSet.AppProcessMessages; // process all events + try + WidgetSet.AppProcessMessages; // process all events + except + on E: Exception do Application.HandleException(E); + end; if Application.Terminated then ModalResult := mrCancel; if ModalResult <> 0 then begin