tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/compat Jdk14Compat.java JdkCompat.java
Date Sat, 19 Jul 2003 00:23:41 GMT
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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message