package com.conveyal.r5.util;

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

/**
 * Convenience functions for working with exceptions (or more generally throwables).
 */
public abstract class ExceptionUtils {

    public static String asString(Throwable throwable) {
        StringWriter sw = new StringWriter();
        sw.append(throwable.getMessage());
        sw.append("\n");
        throwable.printStackTrace(new PrintWriter(sw));
        return sw.toString();
    }

}

@@ -215,16 +215,510 @@
 tils %7B%0A%0A
+    /**%0A     * Returns the output of Throwable.printStackTrace() in a String.%0A     * This is the usual Java stack trace we're accustomed to seeing on the console.%0A     * The throwable.printStackTrace method includes the class name and detail message, and will traverse the whole%0A     * chain of causes showing multiple stack traces, avoiding any reference loops. The resulting string will contain%0A     * linefeeds and tabs which must be properly handled when displaying (e.g. in HTML).%0A     */%0A
     publ
@@ -816,76 +816,8 @@
 ();%0A
-        sw.append(throwable.getMessage());%0A        sw.append(%22%5Cn%22);%0A
     

clean up ExceptionUtils.asString()