Hey, I\'m writing a network application, in which I read packets of some custom binary format. And I\'m starting a background thread to wait for incoming data. The problem i
To be able to send the exception to the parent thread, you can put your background thread in a Callable (it allows throwing also checked exceptions) which you then pass to the submit method of some Executor. The submit method will return a Future which you can then use to get the exception (its get method will throw an ExecutionException which contains the original exception).