Modernize exception catching syntax.
Avoid naked except clauses.