Since I have not even one validation, I think I'm leaning in the wrong direction. Can someone give me a hint? Thank you.
package com.codegym.task.task25.task2510;
/*
Wait and see
*/
public class Solution extends Thread {
public Solution() {
Thread myThread = this.currentThread() ;
myThread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
public void uncaughtException(Thread myThread, Throwable e) {
if ( e instanceof Error) {
System.out.println("Can't keep running");
}
if ( e instanceof Exception) {
System.out.println("Needs handling");
}
if ( e instanceof Throwable) {
System.out.println("Wait and see");
}
}
});
}
public static void main(String[] args) {
}
}