Java Stacktrace Print printStackTrace(PrintStream out, StackTraceElement[] stackTrace)

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

Description

print Stack Trace

License

Apache License

Declaration

public static void printStackTrace(PrintStream out, StackTraceElement[] stackTrace) 

Method Source Code

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

import java.io.PrintStream;

public class Main {
    public static void printStackTrace(PrintStream out, StackTraceElement[] stackTrace) {
        for (int i = 2; i < stackTrace.length; i++) {
            StackTraceElement stackTraceElement = stackTrace[i];
            out.println("\tat " + stackTraceElement);
        }//from  www. j  av  a  2 s  .  c o  m
    }

    public static void printStackTrace(StackTraceElement[] stackTrace) {
        printStackTrace(System.err, stackTrace);
    }
}

Related

  1. printStackTrace(final StackTraceElement[] stack)
  2. printStackTrace(IOException ioe)
  3. PrintStackTrace(PrintStream out)
  4. printStackTrace(PrintStream out)
  5. printStackTrace(PrintStream out)
  6. printStackTrace(PrintStream printStream, Thread thread, Throwable throwable)
  7. printStackTrace(PrintStream ps)
  8. printStackTrace(PrintStream ps, Exception e)
  9. printStackTrace(PrintWriter writer, Thread thread, StackTraceElement[] trace)