Java Stacktrace Print printStackTraceElement(StackTraceElement element, StringBuilder buffer)

Here you can find the source of printStackTraceElement(StackTraceElement element, StringBuilder buffer)

Description

IMprime un stacktrace element.

License

Apache License

Parameter

Parameter Description
element el elemento a pintar
buffer el bufer donde pintar

Declaration

public static void printStackTraceElement(StackTraceElement element, StringBuilder buffer) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*from w w w.  ja  va  2s .c o m*/
     * IMprime un stacktrace element.
     * @param element el elemento a pintar
     * @param buffer el bufer donde pintar
     */
    public static void printStackTraceElement(StackTraceElement element, StringBuilder buffer) {
        buffer.append(element.getClassName());
        buffer.append('.');
        buffer.append(element.getMethodName());
        buffer.append('(');
        buffer.append(element.getFileName());
        if (element.getLineNumber() > 0) {
            buffer.append(':');
            buffer.append(element.getLineNumber());
        }
        buffer.append(')');
    }
}

Related

  1. printStackTrace(Throwable t)
  2. printStackTrace(Throwable t)
  3. printStackTrace(Throwable throwable)
  4. printStackTrace(Throwable throwable)
  5. printStackTraceAsHtml(Throwable t)
  6. printStackTraceHTML(Throwable e)
  7. printStackTraces()
  8. printStackTraceToOutputStream(Throwable t, OutputStream out)
  9. printStackTraceToString(final Throwable t)