All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.shoothzj.javatool.util.ExceptionUtil Maven / Gradle / Ivy

There is a newer version: 3.1.15
Show newest version
package com.github.shoothzj.javatool.util;

public class ExceptionUtil {

    public static String getException(Exception e) {
        StringBuilder builder = new StringBuilder();
        StackTraceElement[] trace = e.getStackTrace();
        for (StackTraceElement traceElement : trace) {
            builder.append("\tat ").append(traceElement).append("\n");
        }

        return builder.toString();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy