[GitHub] thrift pull request #1285: THRIFT-4215/4216 Make transport factories return ...

2017-06-02 Thread dcelasun
Github user dcelasun closed the pull request at:

https://github.com/apache/thrift/pull/1285


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift pull request #1285: THRIFT-4215/4216 Make transport factories return ...

2017-06-02 Thread dcelasun
GitHub user dcelasun opened a pull request:

https://github.com/apache/thrift/pull/1285

THRIFT-4215/4216 Make transport factories return errors

This commit changes the signature of `TTransportFactory.GetTransport` from
```go
GetTransport(trans TTransport) TTransport
```
to
```go
GetTransport(trans TTransport) (TTransport, error)
```
so the factory can pass any underlying error to the caller (previously such 
errors were ignored).

This is a backwards incompatible change for anyone implementing custom 
transports, but it shouldn't effect anyone using the ones in this library.

Fixes [THRIFT-4215](https://issues.apache.org/jira/browse/THRIFT-4215).

Fixes [THRIFT-4216](https://issues.apache.org/jira/browse/THRIFT-4216).

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/dcelasun/thrift THRIFT-4215

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1285.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1285


commit 312a4aadbb2106c9fb21360b87e0c2d5fea8a78e
Author: D. Can Celasun 
Date:   2017-06-02T12:33:32Z

THRIFT-4215 Make transport factories return errors

This commit changes the signature of TTransportFactory.GetTransport
from

  GetTransport(trans TTransport) TTransport

to

  GetTransport(trans TTransport) (TTransport, error)

so the factory can pass any underlying error to the caller (previously
such errors were ignored).

This is a backwards incompatible change for anyone implementing custom
transports, but it shouldn't effect anyone using the ones in this
library.

Fixes THRIFT-4215.

Fixes THRIFT-4216.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---