Here you can find the source of stackTraceToString(StackTraceElement[] ste)
public static String stackTraceToString(StackTraceElement[] ste)
//package com.java2s; public class Main { public static String stackTraceToString(StackTraceElement[] ste) { String str = ""; for (int i = 0; i < ste.length; i++) { str += String.format(" [%02d] %s \n", i, ste[i].toString()); }/*from www. j av a 2 s. c om*/ return str; } }