if (log.isDebugEnabled()) { log.debug("{} aborted at {} after {} attempt(s)", this, now, tries, new Exception(prettyPrintException(throwable))); if (log.isDebugEnabled()) { log.debug("{} timed out at {} after {} attempt(s)", this, now, tries, new Exception(prettyPrintException(throwable))); if (log.isDebugEnabled()) { log.debug("{} failed with non-retriable exception after {} attempt(s)", this, tries, new Exception(prettyPrintException(throwable))); if (log.isDebugEnabled()) { log.debug("{} failed after {} attempt(s)", this, tries, new Exception(prettyPrintException(throwable))); this, prettyPrintException(throwable), tries);
@Test public void testPrettyPrintException() { assertEquals("Null exception.", KafkaAdminClient.prettyPrintException(null)); assertEquals("TimeoutException", KafkaAdminClient.prettyPrintException(new TimeoutException())); assertEquals("TimeoutException: The foobar timed out.", KafkaAdminClient.prettyPrintException(new TimeoutException("The foobar timed out."))); }
} catch (Throwable t) { if (log.isTraceEnabled()) log.trace("{} handleResponse failed with {}", call, prettyPrintException(t)); call.fail(now, t);