MUIClass and Exceptions

Posted by ALB42 on 24. Februar 2018No Comments

When an exception appears which is not covered by any try/except the program will just end (and print the exception to Debugout) which is not very nice. Again take some idea from LCL and catch all exceptions in the Event handler and show to user as nice MessageBox. But MUI certainly does not like it if you leave the Eventhandler in such a rude way 😉 (at least Zune on AROS) so after it the Eventhandler is dead because Zune thinks this is a circular calling. It’s not true but it’s prevents you to call that event again. Best thing here is to end the application an restart. Therefore I ask the user what to do, ignore the exception, knowing that this will have strange effects, or leave the program directly.

The ignore could be interesting if you have the chance to save your data before closing the program. Of course the writer of program can also override the Exception handling (via OnException Event in MuiApp, as used to from Delphi/LCL.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert