WorkerThread and Exceptionhandling

  • Thread starter Thread starter heikekrieg
  • Start date Start date
H

heikekrieg

Hi,

i have the problem that a background WorkerThread is calling Objects
remote (.NET remoting).

Now if the conection is closed my Thread gets an exception. But the
Exception should be handled by my Application. So how can i
bubble(rethrow) an Exception in my background Thread so that the
calling application can hanlde the thread.

Dont forget it is background work to do...

Thx
Ralf
 
Ralf,

You will have to develop a mechanism where you can send a message from
the thread to your app. If it is a Windows Forms app, then you could use
Windows messages to marshal the exception to the UI thread, and then display
the error.

Can you give more details about the application that is supposed to get
the error notification?
 
Back
Top