private static void appendThrowable(StringBuilder sb, Throwable t) { String[] stringRep = ThrowableToStringArray.convert(t); for (String s : stringRep) { if (s.startsWith(CoreConstants.CAUSED_BY)) { // nothing } else if (Character.isDigit(s.charAt(0))) { // if line resembles "48 common frames omitted" sb.append("\t... "); } else { // most of the time. just add a tab+"at" sb.append("\tat "); } sb.append(s).append(CoreConstants.LINE_SEPARATOR); } }
private static void appendThrowable(StringBuilder sb, Throwable t) { String[] stringRep = ThrowableToStringArray.convert(t); for (String s : stringRep) { if (s.startsWith(CoreConstants.CAUSED_BY)) { // nothing } else if (Character.isDigit(s.charAt(0))) { // if line resembles "48 common frames omitted" sb.append("\t... "); } else { // most of the time. just add a tab+"at" sb.append("\tat "); } sb.append(s).append(CoreConstants.LINE_SEPARATOR); } }
private static void appendThrowable(StringBuilder sb, Throwable t) { String[] stringRep = ThrowableToStringArray.convert(t); for (String s : stringRep) { if (s.startsWith(CoreConstants.CAUSED_BY)) { // nothing } else if (Character.isDigit(s.charAt(0))) { // if line resembles "48 common frames omitted" sb.append("\t... "); } else { // most of the time. just add a tab+"at" sb.append("\tat "); } sb.append(s).append(CoreConstants.LINE_SEPARATOR); } }
private static void appendThrowable(StringBuilder sb, Throwable t) { String[] stringRep = ThrowableToStringArray.convert(t); for (String s : stringRep) { if (s.startsWith(CoreConstants.CAUSED_BY)) { // nothing } else if (Character.isDigit(s.charAt(0))) { // if line resembles "48 common frames omitted" sb.append("\t... "); } else { // most of the time. just add a tab+"at" sb.append("\tat "); } sb.append(s).append(CoreConstants.LINE_SEPARATOR); } }
private static void appendThrowable(StringBuilder sb, Throwable t) { String[] stringRep = ThrowableToStringArray.convert(t); for (String s : stringRep) { if (s.startsWith(CoreConstants.CAUSED_BY)) { // nothing } else if (Character.isDigit(s.charAt(0))) { // if line resembles "48 common frames omitted" sb.append("\t... "); } else { // most of the time. just add a tab+"at" sb.append("\tat "); } sb.append(s).append(CoreConstants.LINE_SEPARATOR); } }
private static void appendThrowable(StringBuilder sb, Throwable t) { String[] stringRep = ThrowableToStringArray.convert(t); for (String s : stringRep) { if (s.startsWith(CoreConstants.CAUSED_BY)) { // nothing } else if (Character.isDigit(s.charAt(0))) { // if line resembles "48 common frames omitted" sb.append("\t... "); } else { // most of the time. just add a tab+"at" sb.append("\tat "); } sb.append(s).append(CoreConstants.LINE_SEPARATOR); } }
private static void appendThrowable(StringBuilder sb, Throwable t) { String[] stringRep = ThrowableToStringArray.convert(t); for (String s : stringRep) { if (s.startsWith(CoreConstants.CAUSED_BY)) { // nothing } else if (Character.isDigit(s.charAt(0))) { // if line resembles "48 common frames omitted" sb.append("\t... "); } else { // most of the time. just add a tab+"at" sb.append("\tat "); } sb.append(s).append(CoreConstants.LINE_SEPARATOR); } }
private static void appendThrowable(StringBuilder sb, Throwable t) { String[] stringRep = ThrowableToStringArray.convert(t); for (String s : stringRep) { if (s.startsWith(CoreConstants.CAUSED_BY)) { // nothing } else if (Character.isDigit(s.charAt(0))) { // if line resembles "48 common frames omitted" sb.append("\t... "); } else { // most of the time. just add a tab+"at" sb.append("\tat "); } sb.append(s).append(CoreConstants.LINE_SEPARATOR); } }
private static void appendThrowable(StringBuilder sb, Throwable t) { String[] stringRep = ThrowableToStringArray.convert(t); for (String s : stringRep) { if (s.startsWith(CoreConstants.CAUSED_BY)) { // nothing } else if (Character.isDigit(s.charAt(0))) { // if line resembles "48 common frames omitted" sb.append("\t... "); } else { // most of the time. just add a tab+"at" sb.append("\tat "); } sb.append(s).append(CoreConstants.LINE_SEPARATOR); } }
public void verify(Throwable t) { t.printStackTrace(pw); String[] sa = ThrowableToStringArray.convert(t); StringBuilder sb = new StringBuilder(); for (String tdp : sa) { sb.append(tdp); sb.append(CoreConstants.LINE_SEPARATOR); } String expected = sw.toString(); String result = sb.toString().replace("common frames omitted", "more"); assertEquals(expected, result); }