Slightly simplify exception handling.