ExceptionUtils.java (312B)
1 package eu.siacs.utils; 2 3 public class ExceptionUtils { 4 public static Throwable getRootCause(Throwable e) { 5 Throwable cause; 6 Throwable result = e; 7 8 while(null != (cause = result.getCause()) && (result != cause) ) { 9 result = cause; 10 } 11 return result; 12 } 13 }