Great thanks, I created an bug and will submit a patch soon.
THRIFT-1588. I'll also look into writing a cross language test to help
catch this in all languages

Nathaniel Cook

On Sat, Apr 28, 2012 at 2:09 PM, Roger Meier <[email protected]> wrote:
> Yes, this might be a bug.
>
> The TException.java does nearly nothing, this is probably the reason why the
> generated classes inherit Exception.
> However, java should also inherit from TException to align cross language
> behavior.
> Please, create an issue and submit a patch if possible.
>
> Another thing to improve cross language interoperability are cross language
> tests:
> https://builds.apache.org/view/S-Z/view/Thrift/job/Thrift/lastSuccessfulBuil
> d/artifact/thrift/test/test.log
> any patch to improve these tests or patches to fix issues is welcome!
>
> ;-r
>
>> -----Ursprüngliche Nachricht-----
>> Von: Nathaniel Cook [mailto:[email protected]]
>> Gesendet: Dienstag, 24. April 2012 19:41
>> An: [email protected]
>> Betreff: Discussion on thrift Exceptions
>>
>> I have some questions about how exceptions are handled in thrift because
> it
>> seems to be inconsistent across different languages.
>>
>> The way I see it there are two kinds of exceptions that should be thrown
>> when a client makes a call:
>>
>> 1. The service itself throws an exception that was generated for that
> service
>> 2. The thrift application had an error and throws an exception
>>
>> It seems that the TApplicationException was designed to handle the second
>> case. Also all exceptions thrown should inherit one common exception so
>> that they can easily be caught in the client application.
>>
>> Currently java is different from many of the other languages. The
> generated
>> exceptions from java inherit from the base Exception class while in
>> C++,Python,PHP, JS and possible others extend TException. Is there a
>> specific reason that the Java exceptions are different?
>>
>> If this is a bug I will gladly add it to JIRA and submit a patch.
>>
>> Nathaniel Cook
>>
>
>

Reply via email to