public void notifyFailed(Throwable exception) throws RuntimeException {
  exec.shutdownNow();
  LOGGER.error(exception);
  throw new RuntimeException(exception);
}

public void notifyFailed ( Throwable exception ) throws RuntimeException { exec . shutdownNow ( ) ; LOGGER . error ( exception ) ; throw new RuntimeException ( exception ) ; }
below method will be called if any thread fails during execution
