3 ms·
That's why you allocate every resource in a try-with-resources block, and let the exception fly all the way up to the top level of the stack, where you log it.
by voodootrucker 10y ago
That's why you allocate every resource in a try-with-resources block, and let the exception fly all the way up to the top level of the stack, where you log it.
Everything is unwound, everything is safe, special logic and wrapping not required (though wrapping can be valuable if there is information to add along the way).