Interrupt the thread and then log and re-throw an InterruptedException
as an IOException.
@param msg The message to log and include when re-throwing
@param e The actual exception instances
@throws IOException
1974
public static void interruptedException(String msg, InterruptedException e)
      throws IOException {
    Thread.currentThread().interrupt();
    LOG.error(msg, e);
    throw new IOException(msg, e);
  }
1071461
public static void exception(String message, Throwable e) {
    if(message == null && e != null) {
      message = e.getMessage();
    }
    logExpensive(Level.SEVERE, message, e);
  }
513626
public final void write(Throwable e) throws IOException {
    indent();
    newLine();

    write(e.toString());

    StackTraceElement[] elements = e.getStackTrace();
    for (int i = 0; i < elements.length; i++) {
      newLine();
      write(elements[i].toString());
    }

    Throwable cause = e.getCause();
    if (cause != null) {
      newLine();
      write(cause.toString());
    }

    outdent();
  }
549275
public void logExceptionAndSetInconsistency(String message, Throwable e) throws IOException
   {
      setInconsistency();
      // The ThreadLocal has been initialized so we know that we are in multithreaded mode.
      if (reportContext.get() != null)
      {
         reportContext.get().addLogException(message, e);
      }
      else
      {
         writeException(message, e);
      }
   }
1151695
public void info(String msg, Throwable e) {
        doLog(msg, LOG_INFO, null, e);
    }
20099
private int onException(Exception e) throws IOException {
        eofReached = true;
        if (e instanceof IOException) {
            throw (IOException) e;
        } else if (e instanceof RuntimeException) {
            throw (RuntimeException) e;
        } else {
            // Impossible since InputStream throws no other checked exceptions.
            throw Throwables.failure(e);
        }
    }
864100
void setErrorStatus(String msg, Exception e) {
    this.e = new IOException(msg + " " + (e == null ? "" : e.toString()));
    
    // no more writes will be accepted
    this.isDisabled = true;
    
    // close the executor
    sendExecutor.shutdown();
    LOG.error(msg, e);
  }
643728
public void put(E e) throws InterruptedException {
        Objects.requireNonNull(e);
        final ReentrantLock lock = this.lock;
        lock.lockInterruptibly();
        try {
            while (count == items.length)
                notFull.await();
            enqueue(e);
        } finally {
            lock.unlock();
        }
    }
78759
private void handleException(final Throwable e)
    {
        if ( errorListeners.size() == 0 )
        {
            LOG.error("", e);
        }
        else
        {
            errorListeners.forEach(new Function<UnhandledErrorListener, Void>()
            {
                @Override
                public Void apply(UnhandledErrorListener listener)
                {
                    try
                    {
                        listener.unhandledError("", e);
                    }
                    catch ( Exception e )
                    {
                        ThreadUtils.checkInterrupted(e);
                        LOG.error("Exception handling exception", e);
                    }
                    return null;
                }
            });
        }
    }
796015
public static void logTimeoutException(final Logger logger,
			final TimeoutException e)
	{

		logger.logException(Level.WARN, "TimeoutException", e);
	}
987608
public void msg( Thread t, int severity, Object source, Throwable ex, String msg ) {
        logger.msg( t, severity,source,ex,msg);
    }
835724
private void lock() throws IOException {
		try {
			lock.lockInterruptibly();
		}
		catch (InterruptedException e) {
			Thread.currentThread().interrupt();
			throw new IOException("interrupted");
		}
	}
897280
public static void keeperException(String msg, KeeperException e)
      throws IOException {
    LOG.error(msg, e);
    throw new IOException(msg, e);
  }
1151542
public void warn(String msg, Throwable e) {
        doLog(msg, LOG_WARNING, null, e);
    }
1341544
@Override
    public final void exception ( Exception e ) {
        this.error = true;
        this.exception = e;
        this.received = true;
        synchronized ( this ) {
            notifyAll();
        }
    }
1119177
public void warn(String message, Throwable e) {
		warn(message);
		e.printStackTrace(out);
	}
727429
public void error(String msg, Throwable t)
	{
		log(LogLevel.ERROR, msg, t);
	}