[
https://issues.apache.org/jira/browse/THRIFT-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13678997#comment-13678997
]
Jens Geyer commented on THRIFT-237:
-----------------------------------
I have read this and the two other tickets two times but I'm still slightly
confused.
As far as I understand it, the bottom line is:
- Protocol/Transport/Application exceptions should derive from a common
TException anchestor
- No other exceptions should derive from TException
Can somebody confirm (or even correct) this point of view?
> Update Exception class generation to TException decendent
> ---------------------------------------------------------
>
> Key: THRIFT-237
> URL: https://issues.apache.org/jira/browse/THRIFT-237
> Project: Thrift
> Issue Type: Improvement
> Components: C# - Compiler, Cocoa - Compiler, Java - Compiler, Python
> - Compiler
> Environment: Java
> Reporter: Martin Smith
> Priority: Trivial
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> Make all generated Exception objects derived classes of TExceptions instead
> of Exceptions. This allows callers to handle all errors of their service by
> catching TException, eliminating the need for multiple catch blocks where not
> required by the client code.
> This follows the more recent patterns set for C++, PHP, Perl.
> The languages affects are
> Java, python, Cocoa, csharp
> This could negatively affect code where the base exception class TException
> is handled prior to the generated exception classes.
> e.g.
> try {
> } catch (TException te) {
> } catch (ThriftAppException tae) {
> }
> Patch available for Java, can build patches for python, cocoa and csharp at
> the same time.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira