Top


定義場所(file name)

jdk/src/share/classes/java/lang/Thread.java

説明(description)

    /**
     * Set the handler invoked when this thread abruptly terminates
     * due to an uncaught exception.
     * <p>A thread can take full control of how it responds to uncaught
     * exceptions by having its uncaught exception handler explicitly set.
     * If no such handler is set then the thread's <tt>ThreadGroup</tt>
     * object acts as its handler.
     * @param eh the object to use as this thread's uncaught exception
     * handler. If <tt>null</tt> then this thread has no explicit handler.
     * @throws  SecurityException  if the current thread is not allowed to
     *          modify this thread.
     * @see #setDefaultUncaughtExceptionHandler
     * @see ThreadGroup#uncaughtException
     * @since 1.5
     */

名前(function name)

    public void setUncaughtExceptionHandler(UncaughtExceptionHandler eh) {

本体部(body)

  {- -------------------------------------------
  (1) checkAccess() で...#TODO した後, 
      uncaughtExceptionHandler フィールドにセットするだけ.
      ---------------------------------------- -}

            checkAccess();
            uncaughtExceptionHandler = eh;
        }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.