thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James E. King, III (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (THRIFT-4088) System.out in happy path
Date Tue, 14 Feb 2017 04:41:41 GMT

     [ https://issues.apache.org/jira/browse/THRIFT-4088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James E. King, III reopened THRIFT-4088:
----------------------------------------
      Assignee: James E. King, III

> System.out in happy path
> ------------------------
>
>                 Key: THRIFT-4088
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4088
>             Project: Thrift
>          Issue Type: Improvement
>            Reporter: Edward Capriolo
>            Assignee: James E. King, III
>
> ./lib/java/src/org/apache/thrift/TServiceClient.java
> {noformat}
>   protected void receiveBase(TBase<?,?> result, String methodName) throws TException
{
>     TMessage msg = iprot_.readMessageBegin();
>     if (msg.type == TMessageType.EXCEPTION) {
>       TApplicationException x = new TApplicationException();
>       x.read(iprot_);
>       iprot_.readMessageEnd();
>       throw x;
>     }
>     System.out.format("Received %d%n", msg.seqid);
>     if (msg.seqid != seqid_) {
>       throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID,
>           String.format("%s failed: out of sequence response: expected %d but got %d",
methodName, seqid_, msg.seqid));
>     }
>     result.read(iprot_);
>     iprot_.readMessageEnd();
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message