S
stormogulen
Hi all,
Just a quck question about exception handling in threads:
If an exception occurs in a thread that I have created myself, the
whole application crashes. How do I best handle these exception, and
push them back to the main thread?
I have seen solutions that wrap the Thread class in a SafeThread
class, which has an event that is raised in case of an exception. I
would like to force the implementer to handle this event, so would a
callback in the constructor be a better solution?
I'm also considering using a static event on my Thread class instead
of an event on each instance. Can anybody tell me the drawbacks of
static events?
Best regards
Bjarne
Just a quck question about exception handling in threads:
If an exception occurs in a thread that I have created myself, the
whole application crashes. How do I best handle these exception, and
push them back to the main thread?
I have seen solutions that wrap the Thread class in a SafeThread
class, which has an event that is raised in case of an exception. I
would like to force the implementer to handle this event, so would a
callback in the constructor be a better solution?
I'm also considering using a static event on my Thread class instead
of an event on each instance. Can anybody tell me the drawbacks of
static events?
Best regards
Bjarne