Win32 Thread Exits Unexpectedly
Posted
by sahs
on Stack Overflow
See other posts from Stack Overflow
or by sahs
Published on 2010-05-09T10:42:08Z
Indexed on
2010/05/09
10:48 UTC
Read the original article
Hit count: 237
Hello, I'm writing a C++ application. I realized that one of my worker threads may terminate unexpectedly. The (VS 2005) debug log says:
The thread 'Win32 Thread' (0x5d98) has exited with code -858993460 (0xcccccccc).
I surrounded all the worker thread code with a try/catch block. So, if the reason was an exception, I would catch it. But I can't:
try{
...
Connection* conn = connectionPool->getConnection(); // unexpected exit occurs here
...
} catch(exception& e) {
...
}
I have ten threads running concurrently, and only one of them gets crashed after some time, while the others continue running (and getting new [OCCI] connections).
Is there an exception type that is not caught by "exception"? Or what do I not know about threads/exceptions?
Thanks.
© Stack Overflow or respective owner