public static byte[] getThrowableStackTraceAsBytes(Throwable throwable) throws IOException {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        throwable.printStackTrace(pw);
        return getAsBytes(sw.toString());
    }
Contains utility methods for the error handler.
modules/siddhi-core/src/main/java/io/siddhi/core/util/error/handler/util/ErrorHandlerUtils.java