I start second
thread from main thread .This second thread throws unchecked exception. How can I catch exception or detect that something was wrong.
I can not to get into branch "Everything is OK".
Main start
Thread start
Exception in thread "Thread-0" java.lang.IllegalStateException: Error
at ExceptionThread.run(ExceptionThread.java:4)
Process exited with exit code 0.