View Full Version : Exception and Thread
lestat
06-17-2005, 10:02 PM
In my program i catch exception in branch thread and i need deliver its in main thread.
Steven Hansen
06-20-2005, 09:20 AM
In my program i catch exception in branch thread and i need deliver its in main thread.
18194
You won't be able to "catch" exceptions anywhere except in the call stack that created the exception in the first place. That's the way exceptions work.
If you catch an exception in one thread, and wish to alert another thread about the problem, the standard way to communicate between threads (in the case of windows) is to use events. You set the event in one thread, then use WaitForSingleObject (or one of its siblings) to check for that event.
Good luck.
vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.