Java examples for java.lang:Throwable
get Exception Detail
//package com.java2s; import java.io.PrintWriter; import java.io.StringWriter; public class Main { public static String getExceptionDetail(Throwable e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw, true); e.printStackTrace(pw);//from ww w . jav a 2s. c o m pw.flush(); sw.flush(); return sw.toString(); } }