@Test public void testAppendCause() { IllegalArgumentException ex = new IllegalArgumentException("Ex"); Throwable cause = mock(Throwable.class); IllegalArgumentException result = Exceptions.appendCause(ex, cause); assertThat(result).isSameAs(ex); assertThat(result.getCause()).isSameAs(cause); }
public static <T extends Throwable> T appendCause(T exception, Throwable cause) { return (T) exception.initCause(cause); }
Exceptions { public static <T extends Throwable> T appendCause(T exception, Throwable cause) { return (T) exception.initCause(cause); } }
Exceptions { public static <T extends Throwable> T appendCause(T exception, Throwable cause) { return (T) exception.initCause(cause); } private  Exceptions(); }
Exceptions { public static <T extends Throwable> T appendCause(T exception, Throwable cause) { return (T) exception.initCause(cause); } private  Exceptions(); static RuntimeException tryGetCassandraExceptionCause(RuntimeException exception); static T appendCause(T exception, Throwable cause); }
Exceptions { public static <T extends Throwable> T appendCause(T exception, Throwable cause) { return (T) exception.initCause(cause); } private  Exceptions(); static RuntimeException tryGetCassandraExceptionCause(RuntimeException exception); static T appendCause(T exception, Throwable cause);  }