New protocol for disabling exception suppression

Joe Darcy joe.darcy at
Mon Apr 4 10:52:38 PDT 2011

Hi Remi.

Rémi Forax wrote:
> [...]
>>> Reading the corresponding javadoc,
>>> I've found that the constructor is protected. 
>> That was intentional.
> I know. You aren't a student anymore.

That doesn't mean I don't make mistakes from time to time ;-)

> But I think this intention is not well grounded.
>>> In my opinon, it should
>>> be public. All the other constructors are public, you can instantiate
>>> a Throwable but if you want a Throwable that don't store
>>> suppressed exceptions, you have to subclass it.
>>> I don't understand the rational of this decision.
>> Disabling suppression is a niche capability.  It does not need to be 
>> made as easy to use as other capabilities of Throwable.  If a need 
>> arises to make the new constructor public, that can be done 
>> compatibly in a future release.
> Why not now ?
> Again, why Throwable has to be different from one of it's subclass.

This capability does not need to be used widely; in particular, I don't 
think it needs to be used on instantiations of Throwable objects.  Any 
subclass of Throwable can disable exceptions so the only behavioral 
difference between having this constructor public and protected is that 
that objects where getClass == Throwable cannot have exception 
suppression disabled.


More information about the coin-dev mailing list