Checked Exceptions do not exist on the JVM.
neal at gafter.com
Wed May 20 13:02:15 PDT 2009
On Wed, May 20, 2009 at 11:56 AM, Joseph D. Darcy <Joe.Darcy at sun.com> wrote:
> Neal Gafter wrote:
>> On Wed, May 20, 2009 at 11:02 AM, Joseph D. Darcy <Joe.Darcy at sun.com>
>>> Additionally, on the point of interfacing with other language in Java,
>>> the possibility of having what are in Java checked exceptions thrown by
>>> the caller argue for Dynamic call sites to be regarded as being able to
>>> throw Exception so that the existing Java semantics and checking can be
>> Agreed, though I think you mean that they throw java.lang.Throwable, which
>> is the root of the language's exception hierarchy.
> No, I mean Exception :-) Any Java code throw Throwable or RuntimeException
> of course since those are not tracked by a Java compiler, but the right
> semantics for a Dynamic call site come about if the compiler treats them as
> if the method included "throws Exception" in its declaration.
I think you misread the JLS. The exception hierarchy is rooted at
Throwable. Subtypes of RuntimeException and Error are unchecked. There is
nothing special about the class Exception with respect to exception
More information about the coin-dev