package ru.yandex.webmaster3.storage.logging;

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

/**
 * @author tsyplyaev
 */
public class ExceptionWrapper {
    private final String stackTrace;

    public ExceptionWrapper(final Throwable exception) {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        exception.printStackTrace(pw);
        this.stackTrace = sw.toString();
    }

    public String getStackTrace() {
        return stackTrace;
    }
}
