View Javadoc
1   package com.github.searls.jasmine.exception;
2   
3   import java.io.PrintWriter;
4   import java.io.StringWriter;
5   
6   public class StringifiesStackTraces {
7   
8     public String stringify(Throwable t) {
9       StringWriter stringWriter = new StringWriter();
10      PrintWriter printWriter = new PrintWriter(stringWriter);
11      t.printStackTrace(printWriter);
12      return stringWriter.toString();
13    }
14  
15  }