I think sometimes you would like to simply extract root cause of exception.
The following method will help you.
The following method will help you.
public final static Throwable getRootCause(Throwable t){ for(Throwable s = t.getCause() ;s != null;){ s = t.getCause(); t = s; } return t; }
コメント