Project Lambda: Java Language Specification draft

Alex Blewitt alex.blewitt at gmail.com
Fri Jan 22 16:20:52 PST 2010


On 22 Jan 2010, at 22:55, Alex Buckley <Alex.Buckley at Sun.COM> wrote:

> * Exceptions
>
> [11.2.1 Exception Analysis of Expressions]
>
> A lambda invocation expression on a lambda expression of type
> #T(S1..Sm)(X1..Xn) can throw an exception type E iff either:
>
> - some expression of the argument list can throw E, or
> - there exists an i in 1..n such that Xi is E.

Does that mean the only way to throw a RuntimeException is if it is  
explicitly declared in the type?

Does it also prevent throwing an EOFException if you've only declared  
IOException in the list?

Alex


More information about the lambda-dev mailing list