Review Request 219: Simplify error handling of FormatProvider.get_format_for_id and get_format_for_name.