Just as a side point, Java 7 and above has a try block with special handling of resources [1]. That gives you most of what you want, except that a lot of older Java code isn't using it yet.
(Then again, the same would be true of a macro if it were fairly new and there's code that hasn't been converted to use it yet.)
(Then again, the same would be true of a macro if it were fairly new and there's code that hasn't been converted to use it yet.)
[1] https://docs.oracle.com/javase/tutorial/essential/exceptions...