summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-04-11 08:39:19 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-04-11 08:39:19 +0000
commit95b760d80613d0873a9ed92e4bf29f1ef9b27564 (patch)
treef11414640f0197adaf78bc319b46dcf50e4c1061 /src/gui
parent2d5b6397c7f583fcaad81bf98c6af5623e759592 (diff)
downloadfpGUI-95b760d80613d0873a9ed92e4bf29f1ef9b27564.tar.xz
* Fixed a bug where exceptions were silently handled without notification. This was in the messagequeue code.
* Implemented a default application wide exception handler. Applications will not simply crash and quit. * Added TfpgApplication.HandleException * Added TfpgApplication.OnException event developers can hook into * Added TfpgApplication.ShowException - the default exception handler. * Added TfpgApplication.StopOnException - should the application quit or not when an unhandled exception occurres.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui_form.pas10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/gui_form.pas b/src/gui/gui_form.pas
index e5b802da..f5680e25 100644
--- a/src/gui/gui_form.pas
+++ b/src/gui/gui_form.pas
@@ -240,9 +240,13 @@ begin
// processing messages until this form ends.
// delivering the remaining messages
fpgApplication.ProcessMessages;
- repeat
- fpgWaitWindowMessage;
- until (ModalResult <> 0) or (not Visible);
+ try
+ repeat
+ fpgWaitWindowMessage;
+ until (ModalResult <> 0) or (not Visible);
+ except
+ fpgApplication.HandleException(self);
+ end;
fpgApplication.PopModalForm;
Result := ModalResult;