HadoopUncaughtExceptionHandler (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.service.launcher, class: HadoopUncaughtExceptionHandler

Package org.apache.hadoop.service.launcher

# Class HadoopUncaughtExceptionHandler

java.lang.Object
org.apache.hadoop.service.launcher.HadoopUncaughtExceptionHandler

All Implemented Interfaces:
  `Thread.UncaughtExceptionHandler`

@Public @Evolving public class HadoopUncaughtExceptionHandler extends Object implements Thread.UncaughtExceptionHandler
This class is intended to be installed by calling `Thread.setDefaultUncaughtExceptionHandler(UncaughtExceptionHandler)` in the main entry point. The base class will always attempt to shut down the process if an Error was raised; the behavior on a standard Exception, raised outside process shutdown, is simply to log it. (Based on the class `YarnUncaughtExceptionHandler`)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HadoopUncaughtExceptionHandler()`
  Basic exception handler -logs simple exceptions, then continues.
  `HadoopUncaughtExceptionHandler(Thread.UncaughtExceptionHandler delegate)`
  Create an instance delegating to the supplied handler if the exception is considered "simple".

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `uncaughtException(Thread thread, Throwable exception)`
  Uncaught exception handler.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### HadoopUncaughtExceptionHandler

    public HadoopUncaughtExceptionHandler(Thread.UncaughtExceptionHandler delegate)
    Create an instance delegating to the supplied handler if the exception is considered "simple".
    Parameters:
      `delegate` - a delegate exception handler.

  - ### HadoopUncaughtExceptionHandler

    public HadoopUncaughtExceptionHandler()
    Basic exception handler -logs simple exceptions, then continues.

- ## Method Details

  - ### uncaughtException

    public void uncaughtException(Thread thread, Throwable exception)
    Uncaught exception handler. If an error is raised: shutdown The state of the system is unknown at this point -attempting a clean shutdown is dangerous. Instead: exit
    Specified by:
      `uncaughtException` in interface `Thread.UncaughtExceptionHandler`
    Parameters:
      `thread` - thread that failed
      `exception` - the raised exception