Introduction
Here is the source code for Main.java
Source
public class Main {
public static Throwable getDeepestThrowable(Throwable t) {
Throwable parent = t;
Throwable child = t.getCause();
while (null != child) {
parent = child;
child = parent.getCause();
}
return parent;
}
}