It's important that if `method` throws, then its exception is bubbled up rather than the one from `closeAll`.