How to catch exceptions in Units initialization section in Delphi

I have a third-party unit, the witch throws an exception in the unit initialization section. How can I catch this exception in my application?

+4
source share
2 answers

You cannot catch such a thing. RTL runs the initialization sections, and the rule is that no exceptions are required. If exceptions occur, the error is the terminal.

Another way in this case is that when starting the initialization sections, the infrastructure for handling language exceptions is not yet installed. It itself is installed as part of RTL initialization.

, , . , .


, , RTL-, , , , RTL- . ? , , , , . , . .

+3

OnExceptionEvent TApplicationEvents, , .

-1

Source: https://habr.com/ru/post/1543518/


All Articles