class ExceptionUtils {

  public static String getStackTraceOf(
      final Throwable e) {
    if (null == e) {
      return null;
    }
    final StringWriter writer = new StringWriter();
    final PrintWriter w = new PrintWriter(writer);
    e.printStackTrace(w);
    return writer.toString();
  }

}