Tim Funk wrote:
I have no issue with substring use for jdk1.3 getPartialServletStackTrace() since it should not get called often so the performance shouldn't be an issue (or am I missing something more subtle).

Yes, zero performance impact.


Possible alternative (for the 1.3 version).
public String getPartialServletStackTrace(Throwable t) {
    StringWriter stackTrace = new StringWriter();
    t.printStackTrace(new PrintWriter(stackTrace));
    String st = stackTrace.toString();
    int i = st.lastIndexOf("javax.servlet.");
    if (i>-1)
        return st.substring(0, i);
    else
        return st;
}

Sounds like a good start. There should be a " at " prefix in front of each line (which is something I don't like with traces, since the "at" can never be i18n ready). I'll try to hack that a little bit tomorrow, unless it gets automagically done while I sleep :)


Remy



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to