public static String getComprehensiveMessage(Throwable aThrowable) { StringBuilder sb = new StringBuilder(); getComprehensiveMessage(sb, aThrowable, 0); return sb.toString(); }
public static String getComprehensiveMessage(Throwable aThrowable) { StringBuilder sb = new StringBuilder(); getComprehensiveMessage(sb, aThrowable, 0); return sb.toString(); }
private static void getComprehensiveMessage(StringBuilder aSb, Throwable aThrowable, int aLevel) { aSb.append(aThrowable.getMessage()); Throwable cause = ExceptionUtils.getCause(aThrowable); if (cause != null && cause != aThrowable) { aSb.append('\n'); for (int i = 0; i < aLevel; i++) { aSb.append(" "); } getComprehensiveMessage(aSb, cause, aLevel + 1); } } }
private static void getComprehensiveMessage(StringBuilder aSb, Throwable aThrowable, int aLevel) { aSb.append(aThrowable.getMessage()); Throwable cause = ExceptionUtils.getCause(aThrowable); if (cause != null && cause != aThrowable) { aSb.append('\n'); for (int i = 0; i < aLevel; i++) { aSb.append(" "); } getComprehensiveMessage(aSb, cause, aLevel + 1); } } }