New protocol for disabling exception suppression
Rémi Forax
forax at univ-mlv.fr
Tue Apr 5 05:24:13 PDT 2011
On 04/05/2011 12:27 PM, David Holmes wrote:
> Bruce Chapman said the following on 04/05/11 20:00:
>> On 5/04/2011 2:41 p.m., joe.darcy at oracle.com wrote:
>>> I could see an argument for adding analogous protected constructors to
>>> java.lang.{Exception, RuntimeException, Error} to allow non-platform
>> Without analogous constructors I don't think it will be possible to make
>> a checked exception with suppressed disabled.
> Well Throwable is a checked exception. Without analogous constructors
> users won't be able to make instances of any existing exception types
> (checked or unchecked) with suppression disabled, but ...
>
>> So long as users can make their own checked and unchecked exceptions
>> with suppression disabled that should be enough.
> ... the intent was never to provide users with such a facility, but
> simply to ensure that the actions of the VM were allowed under the
> specification.
>
> David
But one thing that I really like in Java is the fact
that the user has a power really similar to the VM.
That why JRuby, Jython or Groovy runtime exists,
you should not have to be the VM to create a an expression with
suppress exceptions disable.
So like we have initCause, we should have a method
disableSuppressionException.
Rémi
More information about the coin-dev
mailing list