Java Stacktrace Print printStackTrace(StackTraceElement[] stackTrace)

Here you can find the source of printStackTrace(StackTraceElement[] stackTrace)

Description

print Stack Trace

License

Apache License

Declaration

public static String printStackTrace(StackTraceElement[] stackTrace) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String printStackTrace(StackTraceElement[] stackTrace) {
        StringBuilder sb = new StringBuilder();
        for (StackTraceElement s : stackTrace) {
            sb.append(s.toString());/*from   ww w.j  a va2 s  . c o m*/
            sb.append("\n");
        }
        return sb.toString();
    }
}

Related

  1. printStackTrace(PrintStream ps)
  2. printStackTrace(PrintStream ps, Exception e)
  3. printStackTrace(PrintWriter writer, Thread thread, StackTraceElement[] trace)
  4. printStackTrace(StackTraceElement[] elements)
  5. printStackTrace(StackTraceElement[] elements)
  6. printStackTrace(StackTraceElement[] stes, String filter)
  7. printStackTrace(String header, int depth)
  8. printStackTrace(String msg, StackTraceElement[] trace, PrintStream out)
  9. printStackTrace(String msg, Throwable throwable)