I created a web service that invokes a thread that sends e-mails.
When the connection to the internet is terminated, this thread throws an exception.
I want to rethrow that exception to the client.
I tried to use the following code :
catch (HttpException exc)
throw new HttpException(exc.GetHttpCode(), exc.Message);
but since we are in a thread, and nobody can catch the rethrown exception.
Please tell me how to throw an exception from a thread, so that it will can rethrown to the client.