More defensive if getCause() changes

This commit is contained in:
Mike Jensen 2014-05-30 09:46:38 -06:00
parent 8c15c14260
commit 809b3493e4

View File

@ -112,9 +112,10 @@ public class Throwable implements Serializable {
sb.append(" at ").append(trace[i].toString()).append(nl);
}
if (getCause() != null) {
Throwable printCause = getCause();
if (printCause != null) {
sb.append("caused by: ");
getCause().printStackTrace(sb, nl);
printCause.printStackTrace(sb, nl);
}
}