src/org/kocakosm/pitaya/util/Throwables.java
public static List<Throwable> getCauseChain(Throwable t)
	{
		List<Throwable> chain = new ArrayList<Throwable>();
		chain.add(Parameters.checkNotNull(t));
		Throwable cause = t.getCause();
		while (cause != null) {
			chain.add(cause);
			cause = cause.getCause();
		}
		return Collections.unmodifiableList(chain);
	}
public static List<Throwable> getCauseChain(Throwable t)
	{
		List<Throwable> chain = new ArrayList<Throwable>();
		chain.add(Parameters.checkNotNull(t));
		Throwable cause = t.getCause();
		while (cause != null) {
			chain.add(cause);
			cause = cause.getCause();
		}
		return Collections.unmodifiableList(chain);
	}
public static List < Throwable > getCauseChain ( Throwable t ) { List < Throwable > chain = new ArrayList < Throwable > ( ) ; chain . add ( Parameters . checkNotNull ( t ) ) ; Throwable cause = t . getCause ( ) ; while ( cause != null ) { chain . add ( cause ) ; cause = cause . getCause ( ) ; } return Collections . unmodifiableList ( chain ) ; }
Returns the chain of {@code Throwable}s that caused the given one.
The given {@code Throwable} is the first element in the returned
{@code List}, the last one is the root cause.

@param t the {@code Throwable} to get the chain.

@return the chain of {@code Throwable} that caused {@code t}.

@throws NullPointerException if {@code t} is {@code null}.
Returns the chain of { @code Throwable } s that caused the given one . The given { @code Throwable } is the first element in the returned { @code List } the last one is the root cause .