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

Kevin Clark updated THRIFT-372:
-------------------------------

    Description: 
Files that try to load thrift_native need to rescue from LoadError. LoadError 
isn't a StandardError, so isn't caught by a bare rescue.

>From current HEAD (757825).

Clio:rb kev$ g g thrift_native
Manifest:ext/thrift_native.c
ext/extconf.rb:create_makefile 'thrift_native'
ext/thrift_native.c:void Init_thrift_native() {
lib/thrift/protocol/binaryprotocolaccelerated.rb:require 'thrift_native'
spec/protocol_spec.rb:require "thrift_native"
spec/spec_helper.rb:require "thrift_native"

We may want to put the require for the extension in a ruby file, and just 
rescue there. That way load path stuff is taken care of properly, and we get 
our rescue.

  was:lib/rb/thrift/thrift.rb needs to rescue from LoadError. LoadError isn't a 
StandardError, so isn't caught by a bare rescue.


> Ruby lib doesn't rescue properly from lack of native_thrift extension
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-372
>                 URL: https://issues.apache.org/jira/browse/THRIFT-372
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Ruby)
>            Reporter: Kevin Clark
>            Assignee: Bryan Duxbury
>            Priority: Blocker
>             Fix For: 0.1
>
>
> Files that try to load thrift_native need to rescue from LoadError. LoadError 
> isn't a StandardError, so isn't caught by a bare rescue.
> From current HEAD (757825).
> Clio:rb kev$ g g thrift_native
> Manifest:ext/thrift_native.c
> ext/extconf.rb:create_makefile 'thrift_native'
> ext/thrift_native.c:void Init_thrift_native() {
> lib/thrift/protocol/binaryprotocolaccelerated.rb:require 'thrift_native'
> spec/protocol_spec.rb:require "thrift_native"
> spec/spec_helper.rb:require "thrift_native"
> We may want to put the require for the extension in a ruby file, and just 
> rescue there. That way load path stuff is taken care of properly, and we get 
> our rescue.

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

Reply via email to