cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: SAXException weirdness (was Re: [2.1.8-dev] Real exception is not logged anymore)
Date Sun, 25 Sep 2005 08:34:05 GMT
Carsten Ziegeler wrote:

>Sylvain Wallez wrote:
>  
>
>>Ok, I hopefully fixed it.
>>
>>The problems was because of SAXException's buggy exception chaining (or 
>>at least not JDK 1.4 compatible) :
>>- it can wrap a parent exception but doesn't define a getCause() method 
>>that's used by JDK 1.4 to find parent exceptions
>>- it doesn't call its parent's printStacktrace() although it calls its 
>>parent's getMessage().
>>
>>What happened is that when a SAXException was logged, the parent's 
>>stacktrace wasn't logged, and with the new location handling stuff, the 
>>useful information is there.
>>
>>I fixed this by ensuring in CocoonLogFormatter that the full exception 
>>list is properly chained and this solves the problem.
>>
>>Now I don't understand how we were able to print parent stack traces 
>>before...
>>
>>    
>>
>Thanks Sylvain for fixing this - now it works for me as well.
>But, is it correct that it now only works if I'm using LogKit for
>logging with the CocoonLogFormatter? What happens if I'm using log4j or
>something else? We should really make it work for all logging systems.
>  
>

Yup, I agree. I will check how this behaved in 2.1.7, i.e. before I 
changed the exception handling.

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