Сергей30 levelRating:111AdvancedSend message +2 Комментарии (1)популярныеновыестарыеДля того, чтобы оставить комментарий Вы должны sign inСергейУровень 3017 January 2018, 17:38public class Solution extends Thread { public Solution() { // Thread thread = new Thread(); UncaughtExceptionHandler uncaughtExceptionHandler = new UncaughtExceptionHandler() { @Override public void uncaughtException(Thread thread, Throwable throwable) { if (throwable instanceof Error) { System.out.println("Нельзя дальше работать"); } else if (throwable instanceof Exception) { System.out.println("Надо обработать"); } else if (throwable instanceof Throwable) { System.out.println("ХЗ"); } } }; this.setUncaughtExceptionHandler(uncaughtExceptionHandler); } public static void main(String[] args) { } } 0