Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception#set_backtrace does not work (From Jira-5830) #2361

Closed
enebo opened this issue Dec 29, 2014 · 2 comments
Closed

Exception#set_backtrace does not work (From Jira-5830) #2361

enebo opened this issue Dec 29, 2014 · 2 comments

Comments

@enebo
Copy link
Member

enebo commented Dec 29, 2014

Oldy but still not working.,,

def go
  raise 'yo'
end

begin
  go
rescue Exception => e
   e.set_backtrace ['a', 'b']
  raise e
end
$ ruby -v bad.rb
ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]
a: yo (RuntimeError)
        from b

$ jruby -v bad.rb
jruby 1.6.1 (ruby-1.8.7-p330) (2011-05-19 5790d31) (Java HotSpot(TM) Client VM 1.6.0_24) [Windows 7-x86-java]
RuntimeError: yo
      go at bad.rb:2
  (root) at bad.rb:6
@MSNexploder
Copy link
Contributor

works in 9.1.9.0 and 1.7.21 🎉

irb(main):001:0> def go
irb(main):002:1>   raise 'yo'
irb(main):003:1> end
irb(main):004:0>
irb(main):005:0* begin
irb(main):006:1*     go
irb(main):007:1> rescue Exception => e
irb(main):008:1>    e.set_backtrace ['a', 'b']
irb(main):009:1>   raise e
irb(main):010:1> end
RuntimeError: yo
	from a
	from b

@enebo enebo added this to the JRuby 9.2.0.0 milestone May 21, 2017
@enebo
Copy link
Member Author

enebo commented May 21, 2017

sweet!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants