static Throwable getInnerException(Throwable e) { while (e.getCause() != null) e = e.getCause(); return e; }