GitHub user dcelasun opened a pull request: https://github.com/apache/thrift/pull/1286
THRIFT-4215 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). P.S: Some files have formatting-only changes due to `gofmt`. 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/1286.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 #1286 ---- commit e66dbded3a57df8be17c678956abc305345305fc Author: D. Can Celasun <c...@dcc.im> 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. ---