How to catch an exception ocurred in the work thread from the main thread?

  • Thread starter Thread starter Kueushiong Tu
  • Start date Start date
K

Kueushiong Tu

I have a window form application. The main thread creates
a work thread to do a web request. The work thread has the
exception mechanism in place so that if there is anything
wrong with the web request, the exception is catched in
the work thread. However it still causes the main thread
to crash. The debugger output says an
'System.ExecutionEngineException' exception ocurred in
the unknown module is not catched.
How do I catch an exception occurred in the work thread
from the main thread to prevent the application from
being crashed?
 
Kueushiong Tu said:
I have a window form application. The main thread creates
a work thread to do a web request. The work thread has the
exception mechanism in place so that if there is anything
wrong with the web request, the exception is catched in
the work thread. However it still causes the main thread
to crash. The debugger output says an
'System.ExecutionEngineException' exception ocurred in
the unknown module is not catched.
How do I catch an exception occurred in the work thread
from the main thread to prevent the application from
being crashed?z

ExecutionEngineException is quite severe. Can you describe the screnario
in more detail or post some code?

Cheers,
 
Back
Top