This is not in the finalization code but is the default response dialog from TApplication.HandleException.
You can change this behavior by using the TApplication.OnException event and handle it there.
Another possibility is to override the system.ExceptProc. (E.g.: in console apps)
See here:
https://wiki.lazarus.freepascal.org/Logging_exceptions which has a good explanation.
From what I see the application looks terminated by ctrl-c, which is strictly speaking not an exception (but it is a signal!), that can cause side effects.
BTW: even complex applications should not eat exceptions, they should be debugged and fixed.
There, using the full example in the link above (instead of using the code as a template) can help a lot.