On Fri, 13 Dec 2019, Luca Olivetti via lazarus wrote:
Because ShowModal must run the application message loop, and that
already catches the
exceptions. This is in line with the event-based architecture. It's the
same in Delphi.
Yes, I would expect that with Show, but ShowModal is blocking, so I
would expect the try..except to work.
Yes, but ShowModal is not actually "blocking".
It fakes this 'blocking' by running the message loop (which is asynchronous by
nature).
If an exception occurs, it is in an event handler, which, from the
application point of view, is asynchronous.
It's more like threads. Exceptions in threads are also not propagated to the
main thread.
At least, that is how I see it.
Not 100% accurate, but it does the trick for my understanding ;-)
Michael.
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus