æåã«è¨ã£ã¨ãã¾ããã¹ã¬ããã®ç« ã«å ¥ã£ã¦ããªãç解ããã®ã«ç²ããã®ã§ãè¨è¿°ã¬ãã«ä½ãã§ããã ã¹ã¬ããã§æªææã®ä¾å¤ãå¦çããä»ã¾ã§ãã¹ã¬ããå ã§çºçããä¾å¤ã¯ã¹ã¬ããå ã§try-catchããããææããæãç¡ãã£ããjava.lang.Thread.UncaughtExceptionHandlerã¨ããã¤ã³ã¿ãã§ã¼ã¹ã追å ããããããThreadã«ã»ããããäºã§å¤é¨ããä¾å¤æææã®å¦çãè¨è¿°ããäºãã§ããããã«ãªã£ãã Thread t = new Thread(new Runnable() { public void run() { int i=10; while(true) { System.out.println(1/i--); } } }); t.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler()
{{#tags}}- {{label}}
{{/tags}}