Aki Sukegawa created THRIFT-3607:
------------------------------------

             Summary: Unify exception handling policy of TProcessor
                 Key: THRIFT-3607
                 URL: https://issues.apache.org/jira/browse/THRIFT-3607
             Project: Thrift
          Issue Type: Improvement
            Reporter: Aki Sukegawa


A discussion in THRIFT-1805 uncovered inconsistent error handling behaviors of 
TProcessors across languages and releases.
Most outstanding are Java sync and async processors as described there, but 
others are also subtly different in details.

I propose unifying the processor error catching policy as follows:

* Catch general exception and send TApplicationException (INTERNAL_ERROR) to 
the client
* Do not catch TTransportException and disconnect, as we can't reliably send an 
error through problematic transport
* Send TApplicationException to the client as is, not newly wrapping with 
INTERNAL_ERROR

That way users can still arbitrarily disconnect  the client by throwing 
TTransportException.
(IMO ideally this should have been done by exposing "client context" object to 
the handler instead)

Last one can be a bit controversial as it can be regarded as information leak.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to