BUG 1.4: do not suppress errors when closing file handles
xref https://github.com/pandas-dev/pandas/pull/47153#discussion_r884156873, closes https://github.com/pandas-dev/pandas/issues/47136
> @twoertwein can you open against main instead and we will merge this first, then merge main on the other PR

These changes will fail on main because `_BytesTarFile` was causing errors. I'm not entirely sure why, maybe `super().close()` will call close on both superclasses which then caused a ValueError. right. so this PR is effectively a manual partial backport of https://github.com/pandas-dev/pandas/pull/47153 (opened prematurely) and not broken off from #47153

I suppose that's OK (although not how we normally do things) if there are other issues on main.

the other PR should be merged first then? > right. so this PR is effectively a manual partial backport of #47153 (opened prematurely) and not broken off from #47153

#47153 also de-duplicates the write buffer across `_BytesTarFile` and `_BytesZipFile` which is technically not needed for this bug.

> the other PR should be merged first then?

When seeing it as a backport, it would make sense to merge the other one first. maybe a cleaner option: I do not remove the try-catch in #47153 (just fix the underlying bug+cleanup), open this PR against main after #47153 is merged > maybe a cleaner option: I do not remove the try-catch in #47153 (just fix the underlying bug+cleanup), open this PR against main after #47153 is merged

I removed the bug fix in #47153 > maybe a cleaner option: I do not remove the try-catch in #47153 (just fix the underlying bug+cleanup), open this PR against main after #47153 is merged

sgtm Closing this one as I don't know how to change the target branch. Opened #47165.