'Handle raising the correct exception, depending on the error. Many
errors share the same HTTP response code, meaning we have to get really
kludgey and do string searches to figure out what went wrong.'

def _handle_error(self, response, body):

    boto.log.error(('%s    %s' % (response.status, response.reason)))
    boto.log.error(('%s' % body))
    if ('Address    blacklisted.' in body):
        ExceptionToRaise = ses_exceptions.SESAddressBlacklistedError
        exc_reason = 'Address    blacklisted.'
    elif ('Email    address    is    not    verified.' in body):
        ExceptionToRaise = ses_exceptions.SESAddressNotVerifiedError
        exc_reason = 'Email    address    is    not    verified.'
    elif ('Daily    message    quota    exceeded.' in body):
        ExceptionToRaise = ses_exceptions.SESDailyQuotaExceededError
        exc_reason = 'Daily    message    quota    exceeded.'
    elif ('Maximum    sending    rate    exceeded.' in body):
        ExceptionToRaise = ses_exceptions.SESMaxSendingRateExceededError
        exc_reason = 'Maximum    sending    rate    exceeded.'
    elif ('Domain    ends    with    dot.' in body):
        ExceptionToRaise = ses_exceptions.SESDomainEndsWithDotError
        exc_reason = 'Domain    ends    with    dot.'
    elif ('Local    address    contains    control    or    whitespace' in body):
        ExceptionToRaise = ses_exceptions.SESLocalAddressCharacterError
        exc_reason = 'Local    address    contains    control    or    whitespace.'
    elif ('Illegal    address' in body):
        ExceptionToRaise = ses_exceptions.SESIllegalAddressError
        exc_reason = 'Illegal    address'
    elif re.search('Identity.*is    not    verified', body):
        ExceptionToRaise = ses_exceptions.SESIdentityNotVerifiedError
        exc_reason = 'Identity    is    not    verified.'
    elif ('ownership    not    confirmed' in body):
        ExceptionToRaise = ses_exceptions.SESDomainNotConfirmedError
        exc_reason = 'Domain    ownership    is    not    confirmed.'
    else:
        ExceptionToRaise = self.ResponseError
        exc_reason = response.reason
    raise ExceptionToRaise(response.status, exc_reason, body)
