Is it possible to start java thread in UncaughtExceptionHandler?
Yes, you can run Thread
in Thread.UncaughtExceptionHandler.uncaughtException
... provided that it has Thread
not been launched before.
But it is not possible to run Thread
that was passed as an argument t
. It will (always) be Thread
, which has already been started and completed.
You can run the specified Thread
maximum once. If you try to run a second time, you get InvalidStateException
. Is always.
source to share