Exception transparency - lone throws (no checked exceptions)
Alex Buckley
alex.buckley at oracle.com
Thu Jun 10 13:00:34 PDT 2010
Exception transparency is about abstracting over the types of checked
exceptions that can be thrown by a method.
This proposal is not about exception transparency. This proposal is
about _ignoring_ the checked exceptions that can be thrown by a method.
You say yourself:
On 6/10/2010 5:57 AM, Stephen Colebourne wrote:
> Current checked exceptions are maintained, however users have the
> choice to effectively turn them off.
So, this proposal is about allowing checked exceptions to be turned off.
And turned off in a very specific way: as per your response to Peter, if
the caller doesn't care to catch anything from a 'lone throws' method,
then the "checked" exception propagates up the call chain, and may be
caught somewhere via a new 'lone catch' mechanism. Basically the same as
wrapping checked exceptions in RuntimeExceptions, as proposed by
http://bugs.sun.com/view_bug.do?bug_id=6534270.
While I'm not especially fond of all the machinery around exception
transparency, exception transparency _is_ what we want to provide.
Alex
More information about the lambda-dev
mailing list