How can I throw an exception back from a thread.
Posted on 2003-03-12
I am relatively new to using thread but everything seemed to be ok until I tried to throw an exception back to my application from my new thread.
I thaught it would be simple
public MyThread extends Thread implements Runnable
public void run() throws Exception
.... do stuff ....
throw MyException("My Error message");
But it seems java wont let the run method of a Thread to throw an excepotion. :-(
So what are my options.. I want to throw the exception so I can catch it within the application, stop a progress bar and open an error dialog.