@Override
  public void uncaughtException(Thread t, Throwable e) {
    String msg = String.format("Uncaught exception in thread %s.", t.getName());
    LOGGER.error(msg, e);
    System.err.println(msg);
    e.printStackTrace(System.err);
    try {
      ThreadUtil.logThreadDump("Thread dump from uncaught exception handler.");
      runnable.run();
    } catch (Throwable throwable) {
      // Ignore to avoid further exception propagation
    }
  }
Method invoked when the given thread terminates due to the
given uncaught exception.
<p>Any exception thrown by this method will be ignored by the
Java Virtual Machine.

@param t the thread
@param e the exception
samza-core/src/main/java/org/apache/samza/util/SamzaUncaughtExceptionHandler.java