Главная страница | назад

Article #16675: Catching exceptions in a thread

 Question and Answer Database

FAQ1675C.txt   Catching exceptions in a thread
Category   :Windows API
Platform    :All
Product    :C++Builder  1.x


How can I catch a C++ exception in a thread.  I have created a 
thread with CreateThread() and my exception is never caught.


Use _beginthread().  The function CreateThread does not 
initialize the RTL, which the exceptions depend on. So,
CreateThread() may work for them, but MS say's to use 
_beginthread()if you are using any functions from our RTL.=

7/2/98 10:32:32 AM

Last Modified: 01-SEP-99