Java Stacktrace stackTraceGenerate()

Here you can find the source of stackTraceGenerate()

Description

stack Trace Generate

License

Open Source License

Declaration

public static String stackTraceGenerate() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String stackTraceGenerate() {
        StackTraceElement[] steArr = Thread.currentThread().getStackTrace();
        String ret = "";
        for (StackTraceElement ste : steArr) {
            ret += ste.toString() + "\n";
        }//w ww.  j  av  a2 s.c o m
        return ret;
    }
}

Related

  1. stackTraceContainsCause(Throwable throwable, Class searchedCause)
  2. stackTraceElementToString( StackTraceElement element)
  3. stackTraceElementWithLinenumber( StackTraceElement stackTraceElement)
  4. stackTraceElementWithLinenumberAsString(StackTraceElement stackTraceElement)
  5. stackTraceEquals(StackTraceElement[] ta1, StackTraceElement[] ta2)