Code:
public void doSomethingOrThrowUncheckedException() { Thread worker = new Thread(new Runnable() { public void run() { try { myObject.doSomething() } catch(CheckedException e) { new UncheckedException (); } } }); worker.start(); } Explanation
I want to perform some work in another thread that can throw a checked exception.
I cannot wait for this work to finish and I want the method caller to know if something went wrong with this work since the new thread is not able to handle the exception properly.
Is there a mechanism I can use?