Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9
-
None
Description
In Thrift 0.8.0, Thrift generated Java code did not swallow application exceptions. As a result of THRIFT-1658, this behavior changed in 0.9.0 and now the generated code swallows ALL application exceptions (via ProcessFunction). Apparently this was the behavior in Thrift 0.6.0 and while I see the rationale, it is breaking our applications.
Our code relies on the fact that exceptions can propagate outside of Thrift for certain things (e.g., to aggressively drop connections for clients that send invalid/malformed requests). ProcessFunction makes it near impossible to do this – not only does it swallow the exception, it also loses all information about the original exception and just writes out a generic TApplicationException.
IMO ProcessFunction should only catch TException. If the application code wants to use other exceptions for some reason (in particular, Errors and RuntimeExceptions), Thrift shouldn't prevent that.
Attachments
Attachments
Issue Links
- blocks
-
THRIFT-3607 Unify exception handling policy of TProcessor
- Open
- breaks
-
THRIFT-3686 Java processor should report internal error on uncaught exception
- Closed
-
ACCUMULO-2935 Tests consistently hanging after Thrift 0.9.1
- Resolved
- is related to
-
ACCUMULO-2950 Fix handling of server-side exceptions
- Resolved
-
THRIFT-3680 Java async processor fails to notify errors to clients
- Closed
-
THRIFT-4556 Optional rethrow of unhandled exceptions in java processor
- Closed
-
THRIFT-3607 Unify exception handling policy of TProcessor
- Open
- relates to
-
THRIFT-1658 Java thrift server is not throwing TApplicationException
- Closed
- links to