@Test public void testStackTraceString() { String res = ErrorUtil.stackTraceString(DUMMY_EXCEPTION); assertTrue(res.startsWith(firstTwoLinesStackTrace())); }
public static String stackTraceString(Exception e) { StringWriter stackTrace = new StringWriter(); try (PrintWriter pw = new PrintWriter(stackTrace)) { e.printStackTrace(pw); return stackTrace.toString(); } }
ErrorUtil { public static String stackTraceString(Exception e) { StringWriter stackTrace = new StringWriter(); try (PrintWriter pw = new PrintWriter(stackTrace)) { e.printStackTrace(pw); return stackTrace.toString(); } } }
ErrorUtil { public static String stackTraceString(Exception e) { StringWriter stackTrace = new StringWriter(); try (PrintWriter pw = new PrintWriter(stackTrace)) { e.printStackTrace(pw); return stackTrace.toString(); } }  }
ErrorUtil { public static String stackTraceString(Exception e) { StringWriter stackTrace = new StringWriter(); try (PrintWriter pw = new PrintWriter(stackTrace)) { e.printStackTrace(pw); return stackTrace.toString(); } }  static String fullExceptionDetails(Exception e); static String singleLineExceptionTrace(Exception e); static String stackTraceString(Exception e); }
ErrorUtil { public static String stackTraceString(Exception e) { StringWriter stackTrace = new StringWriter(); try (PrintWriter pw = new PrintWriter(stackTrace)) { e.printStackTrace(pw); return stackTrace.toString(); } }  static String fullExceptionDetails(Exception e); static String singleLineExceptionTrace(Exception e); static String stackTraceString(Exception e);  }