Replace "except:" with "except Exception:"

Fixes #5669

Most changed, but not all; a few looked like they belonged being bare.
In particular, mpmath is not affected, nor tests.
Merge pull request #7576 from clsn/bare_except

Replace "except:" with "except Exception:"