You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Luke Lu (JIRA)" <ji...@apache.org> on 2009/02/03 02:17:59 UTC

[jira] Closed: (THRIFT-298) Exception propagation seems broken for Ruby clients

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

Luke Lu closed THRIFT-298.
--------------------------


Thanks!

> Exception propagation seems broken for Ruby clients
> ---------------------------------------------------
>
>                 Key: THRIFT-298
>                 URL: https://issues.apache.org/jira/browse/THRIFT-298
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Ruby)
>            Reporter: Luke Lu
>            Assignee: Luke Lu
>            Priority: Blocker
>         Attachments: 0001-THRIFT-298-Fixed-generated-exception-propagation-in.patch
>
>
> Instead of raising the user defined exception, it's ../../lib/rb/lib/thrift/struct.rb:176:in `initialize': wrong number of arguments (0 for 1) (ArgumentError)
> Any thrift service that throws user defined exceptions would get the same exception. Here is an example for the included tutorial:
> $ ./RubyClient.rb 
> ping()
> ping()
> add(1,1)
> 1+1=2
> add(1,4)
> 1+4=5
> calculate(1, Work(comment=None, num1=15, num2=10, op=2))
> 15-10=5
> getStruct(1)
> Log: 5
> calculate(1, Work(comment=None, num1=1, num2=0, op=4))
> ../../lib/rb/lib/thrift/struct.rb:176:in `initialize': wrong number of arguments (0 for 1) (ArgumentError)
>         from ../../lib/rb/lib/thrift/struct.rb:176:in `call'
>         from ../../lib/rb/lib/thrift/struct.rb:176:in `exception_initialize'
>         from ../../lib/rb/lib/thrift/struct.rb:194:in `initialize'
>         from ../../lib/rb/lib/thrift/struct.rb:194:in `new'
>         from ../../lib/rb/lib/thrift/struct.rb:194:in `read_field'
>         from ../../lib/rb/lib/thrift/struct.rb:184:in `handle_message'
>         from ../../lib/rb/lib/thrift/struct.rb:95:in `read'
>         from ../../lib/rb/lib/thrift/struct.rb:92:in `loop'
>         from ../../lib/rb/lib/thrift/struct.rb:92:in `read'
>         from ../../lib/rb/lib/thrift/client.rb:29:in `receive_message'
>         from ../gen-rb/Calculator.rb:55:in `recv_calculate'
>         from ../gen-rb/Calculator.rb:47:in `calculate'
>         from ./RubyClient.rb:44
> I've verified that this is broken in the current trunk (and quite a few commits back as well)
> This is a blocker for us to release another open source package using thrift.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.