View Javadoc

1   package org.paneris.util;
2   
3   import java.io.StringWriter;
4   import java.io.PrintWriter;
5   
6   public class ExceptionUtils {
7     public static String stackTrace(Throwable e) {
8       StringWriter buf = new StringWriter();
9       e.printStackTrace(new PrintWriter(buf));
10      return buf.toString();
11    }
12  }