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

stack.source.internal.Throwables Maven / Gradle / Ivy

There is a newer version: 0.4.2
Show newest version
package stack.source.internal;

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

public final class Throwables {
    private Throwables() {
    }

    public static String getStackTraceAsString(Throwable e) {
        StringWriter stringWriter = new StringWriter();
        PrintWriter printWriter = new PrintWriter(stringWriter);
        e.printStackTrace(printWriter);
        printWriter.flush();
        return stringWriter.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy