Proposal: ARM and SuppressedException

Frédéric Martini frederic.martini at gmail.com
Mon Sep 7 02:50:18 PDT 2009


Hello (and sorry for my poor english),


I've juste reading the most recent version of the proposal :
http://docs.google.com/View?id=ddv8ts74_3fs7483dp
And I've a suggestion about the suppressed's exception.


Instead of adding addSuppressedException()/getSuppressedExceptions() to
throwable, we can use the "initCause" to store the suppressed exception.
For example by adding a method like this on Throwable :



    public void addInitCause(Throwable suppressedException) {
        Throwable t = this;
        while (t.getCause()!=null) {
            t = t.getCause();
        }
        t.initCause(suppressedException);
    }



So we have not need to modify the printStackTrace()'s method, the
suppressed's exception will be added at the end of the initCause...


Fred,



More information about the coin-dev mailing list