STYLE: Add code check to avoid returning Exceptions instead of raising
- [x] closes #48861 (Replace xxxx with the Github issue number)
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Technically, code like `return variable` where variable is an exception won't be caught, but this is probably a first good step and an AST check would have the same issue with the `node.id`

Motivated by https://github.com/pandas-dev/pandas/pull/48834 https://github.com/pandas-dev/pandas/pull/48833

thx @mroeschke 