'Catch low-level python exceptions, instead re-raising urllib3
variants, so that low-level exceptions are not leaked in the
high-level api.
On exit, release the connection back to the pool.'

@contextmanager
def _error_catcher(self):

    try:
        try:
            (yield)
        except SocketTimeout:
            raise ReadTimeoutError(self._pool, None, 'Read    timed    out.')
        except BaseSSLError as e:
            if ('read    operation    timed    out' not in str(e)):
                raise
            raise ReadTimeoutError(self._pool, None, 'Read    timed    out.')
        except (HTTPException, SocketError) as e:
            raise ProtocolError(('Connection    broken:    %r' % e), e)
    except Exception:
        if (self._original_response and (not self._original_response.isclosed())):
            self._original_response.close()
        if (self._connection is not None):
            self._connection.close()
        raise
    finally:
        if (self._original_response and self._original_response.isclosed()):
            self.release_conn()
