You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by jeking3 <gi...@git.apache.org> on 2017/01/23 14:05:16 UTC

[GitHub] thrift pull request #1116: java: cause of TTransportException added to TNonb...

Github user jeking3 commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1116#discussion_r97323288
  
    --- Diff: lib/java/src/org/apache/thrift/transport/TNonblockingServerSocket.java ---
    @@ -93,7 +93,7 @@ public TNonblockingServerSocket(NonblockingAbstractServerSocketArgs args) throws
           serverSocket_.bind(args.bindAddr, args.backlog);
         } catch (IOException ioe) {
           serverSocket_ = null;
    -      throw new TTransportException("Could not create ServerSocket on address " + args.bindAddr.toString() + ".");
    +      throw new TTransportException("Could not create ServerSocket on address " + args.bindAddr.toString() + ".", ioe);
    --- End diff --
    
    I like the use of inner exception handling here (that's what C# calls it, in Java it's a Throwable Cause).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---