I\'d like to know how I could I thorw a \"final\" Exception, containing a detail message with all the detail messages of a number of chained exceptions.
I think what you need is:
public static List getExceptionMessageChain(Throwable throwable) {
List result = new ArrayList();
while (throwable != null) {
result.add(throwable.getMessage());
throwable = throwable.getCause();
}
return result; //["THIRD EXCEPTION", "SECOND EXCEPTION", "FIRST EXCEPTION"]
}