CLN GH22874 replace bare excepts in pandas/io/pytables.py
This PR changes bare excepts in `pandas/io/pytables.py` to more specific exceptions. I defaulted to using specific exceptions that seemed likely/triggered test errors, but it may be the case that I'm missing some or it's better to leave it as `Exception`.

- [x] closes #22874
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
