cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Cocoon stacktraces in trunk.
Date Fri, 19 Aug 2005 22:08:46 GMT
Ugo Cei wrote:

> Il giorno 19/ago/05, alle 16:03, Sylvain Wallez ha scritto:
>
>> Well, standard is the way to go as we can't assume everybody will 
>> want to deploy Xalan just to have error pages.
>
>
> Hmmm, I have a better idea, inspired once again by the Orbeon folks 
> (don't whine, it was you who pointed to 
> http://www.orbeon.com/blog/2005/08/16/ops-stack-traces/ first ;-) ).
>
> Why don't we modify the Exception generator so that, instead of 
> outputting the Java stacktrace as a text, we do a getStackTrace on the 
> exception, traverse the returned array of StackTraceElement's and for 
> each one we output a <ex:stackTraceElement> having <ex:className>, 
> <ex:methoName>, etc. as children?
>
> This would give us much more flexibility in presenting stacktraces, 
> without having to convert newlines into <br>s and such silliness.


For sure the ops stracktrace has more eye-candy at first look, but the 
experience shows that it often happens that Java stacktraces are 
copy/pasted to be send by mail or IM (happens to me at least once a 
day). I'm not sure a fancy html layout would survive this.

And well, converting <br> isn't that hard. I just committed an updated 
version that no more uses exslt, so Saxon will be happy.

> Only problem, Throwable.getStackTrace was introduced in 1.4, AFAIK. So 
> we could do this for trunk only, unless there's another method to get 
> to the same info.


Yup. That would mean either more code for JDK 1.3 compatibility or 
different DTDs in branch and trunk.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message