public static String stackTrace(Throwable t) { ByteArrayOutputStream baos = new ByteArrayOutputStream(2048); PrintStream printStream = new PrintStream(baos); t.printStackTrace(printStream); return baos.toString();
public static String stackTrace() { String result; try { throw new Throwable(); } catch (Throwable t) { result = ERXUtilities.stackTrace(t); }   return result.substring(122);
    public static String stackTrace(Throwable t) {        ByteArrayOutputStream baos = new ByteArrayOutputStream(2048);        PrintStream printStream = new PrintStream(baos);        t.printStackTrace(printStream);        return baos.toString();    }