Java Throwable to String stacktraceToString(Throwable t)

Here you can find the source of stacktraceToString(Throwable t)

Description

stacktrace To String

License

Open Source License

Declaration

public static String stacktraceToString(Throwable t) 

Method Source Code


//package com.java2s;

import java.io.PrintWriter;
import java.io.StringWriter;

public class Main {
    public static String stacktraceToString(Throwable t) {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        t.printStackTrace(pw);/*from  www.j a  v  a2  s .  c  om*/
        return sw.toString();
    }
}

Related

  1. stackTraceToString(Throwable eIn)
  2. stackTraceToString(Throwable ex)
  3. StackTraceToString(Throwable ex)
  4. stackTraceToString(Throwable t)
  5. stackTraceToString(Throwable t)
  6. stackTraceToString(Throwable t)
  7. stackTraceToString(Throwable t)
  8. stackTraceToString(Throwable th)
  9. stackTraceToString(Throwable throwable)