[logback-dev] Throwable.getSuppressed()

Joern Huxhorn jhuxhorn at googlemail.com
Sat Nov 5 04:03:02 CET 2011


On 04.11.2011, at 17:22, ceki wrote:

> On 04/11/2011 9:46 AM, Joern Huxhorn wrote:
>> Hi Ceki,
>> thanks a lot!
>> I just merged my pull request.
>> 
>> Now we'd need to decide how support should be added to
>> • ch.qos.logback.classic.db.DBAppender
>> • ch.qos.logback.classic.html.DefaultThrowableRenderer
>> • ch.qos.logback.classic.net.SyslogAppender
>> • ch.qos.logback.classic.pattern.ThrowableProxyConverter
>> • ch.qos.logback.classic.spi.ThrowableProxyUtil.asString
> 
> I'd start with ThrowableProxyConverter and build from
> there. Annoyingly enough, testing this feature would require JDK 1.7
> which in turn would force the build to require JDK 1.7. Alternatively,
> we could populate ThrowableProxy with suppressed exceptions and have
> the tests work from there (without requiring JDK 1.7). Any other ideas?
> 

I've given it a shot in the https://github.com/ceki/logback/tree/suppressed branch.

I implemented asString and added two tests that are only executed if running on Java 7. They already succeed.
Merge the branch in if you like it.

On a side note, I updated JUnit to 4.10 since I use Assume and I think that some previous version had an issues with that feature.
Not sure, better safe than sorry.

Cheers,
Joern.


More information about the logback-dev mailing list