Here you can find the source of getDetails(Throwable t)
public static String getDetails(Throwable t)
//package com.java2s; //License from project: Open Source License import java.io.PrintWriter; import java.io.StringWriter; public class Main { /**//from w ww. jav a2 s. c o m * Returns a detailed message of the t, including the stack trace. */ public static String getDetails(Throwable t) { assert t != null; StringWriter sw = new StringWriter(); t.printStackTrace(new PrintWriter(sw)); return t.getMessage() + "\n" + sw.toString(); } }