Replace "except:" with "except Exception:"

Fixes #5669

Purely mechanical replace, nothing more clever.