Proposal: Automatic Resource Management

Neal Gafter neal at
Sat Feb 28 13:04:44 PST 2009

On Sat, Feb 28, 2009 at 12:33 PM, Joshua Bloch <jjb at> wrote:
>> The language construct as you specified it has no way to determine
>> which exception is more serious.  For example, a VM failure, such as
>> an out-of-memory condition on the close(), is more serious than a
>> closed connection on a particular write.
> Please take a closer look at the desugaring! Like all VM
> failures, OutOfMemoryError is not a subtype of Exception, so it will never
> be suppressed by the automatic resource management statement.  This is by
> design.  While the specified suppression behavior may not be perfect, it
> does a far better job than most programmers do when left to cope with the
> situation themselves.

My point remains, even if not with this particular exception.

More information about the coin-dev mailing list