| ▲ | cogman10 2 hours ago | |||||||||||||||||||||||||
Java's is
I like the Java method for things like files because if the there's an exception during the close of a file, the regular `IOException` block handles that error the same as it handles a read or write error. | ||||||||||||||||||||||||||
| ▲ | mort96 2 hours ago | parent [-] | |||||||||||||||||||||||||
What do you do if you wanna return the file (or an object containing the file) in the happy path but close it in the error path? | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||