Java Stacktrace to String getStacktraceAsString(Exception e)

Here you can find the source of getStacktraceAsString(Exception e)

Description

get Stacktrace As String

License

Open Source License

Declaration

public static String getStacktraceAsString(Exception e) 

Method Source Code


//package com.java2s;
import java.io.PrintWriter;
import java.io.StringWriter;

public class Main {
    public static String getStacktraceAsString(Exception e) {

        StringWriter errors = new StringWriter();
        e.printStackTrace(new PrintWriter(errors));
        return errors.toString();

    }//w ww . ja  va2s.c  om
}

Related

  1. getStackTrace(Exception e)
  2. getStackTrace(Exception e)
  3. getStackTrace(Exception e)
  4. getStackTrace(Exception exception)
  5. getStackTrace(Exception x)
  6. getStacktraceAsString(Exception e)
  7. getStackTraceAsString(Exception e)
  8. getStackTraceAsString(Exception e)
  9. getStackTraceAsString(String pstrMessage, Exception poException)