Here you can find the source of getExceptionTrace(Throwable e)
Parameter | Description |
---|---|
e | The exception instance. |
public static String getExceptionTrace(Throwable e)
//package com.java2s; //License from project: Apache License import java.io.PrintWriter; import java.io.StringWriter; public class Main { /**//www .j av a2 s . com * Get the stack trace of the exception. * @param e The exception instance. * @return The full stack trace of the exception. */ public static String getExceptionTrace(Throwable e) { if (e != null) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); return sw.toString(); } return "No Exception"; } }