@contextmanager
    def io_exception_context(self):
        try:
            yield
        except (socket.error, __HOLE__, IOError) as e:
            raise TTransportException(
                type=TTransportException.END_OF_FILE,
                message=str(e))
        except iostream.StreamBufferFullError as e:
            raise TTransportException(
                type=TTransportException.UNKNOWN,
                message=str(e))
        except gen.TimeoutError as e:
            raise TTransportException(
                type=TTransportException.TIMED_OUT,
                message=str(e))
dataset/ETHPy150Open eleme/thriftpy/thriftpy/tornado.py/TTornadoStreamTransport.io_exception_context