def example_on_exception():
    policy = SansIOHTTPPolicy()
    request = HttpRequest('GET', 'https://bing.com')
    try:
        response = policy.next.send(request)
    except Exception:
        if (not policy.on_exception(request)):
            raise
    (exc_type, exc_value, exc_traceback) = sys.exc_info()
def example_on_exception():
    policy = SansIOHTTPPolicy()
    request = HttpRequest('GET', 'https://bing.com')
    try:
        response = policy.next.send(request)
    except Exception:
        if (not policy.on_exception(request)):
            raise
    (exc_type, exc_value, exc_traceback) = sys.exc_info()