Here you can find the source of dump(final Throwable throwable)
Parameter | Description |
---|---|
throwable | a parameter |
public static final String dump(final Throwable throwable)
//package com.java2s; import java.io.PrintWriter; import java.io.StringWriter; public class Main { /**/*from ww w . jav a 2 s . c o m*/ * @param throwable * @return StackTrace of given throwable as a String */ public static final String dump(final Throwable throwable) { if (throwable == null) { return "null"; } final StringWriter sw = new StringWriter(512); throwable.printStackTrace(new PrintWriter(sw, true)); return sw.toString(); } }