Throwable

Charles Oliver Nutter headius at headius.com
Tue Aug 18 12:38:45 PDT 2009


On Tue, Aug 18, 2009 at 6:29 AM, Raffaello
Giulietti<raffaello.giulietti at gmail.com> wrote:
> The language compiler complains about an
> unreported exception Throwable; must be caught or declared to be thrown
> in using both InvokeDynamic and the (invisible) MethodHandle.invoke()
>
> Why is this so?
> What about an (unchecked) RuntimeException instead?

I believe this was added because in theory the target of invokedynamic
or a Method handle could produce any Throwable in the system, and so
in order for you to be able to propagate or handle those throwables,
it must throw Throwable.

- Charlie


More information about the mlvm-dev mailing list