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

enebo opened this issue Dec 29, 2014 · 2 comments

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

enebo opened this issue Dec 29, 2014 · 2 comments


Copy link

@enebo enebo commented Dec 29, 2014

Oldy but still not working.,,

def go
  raise 'yo'

rescue Exception => e
   e.set_backtrace ['a', 'b']
  raise e
$ 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
Copy link

@MSNexploder MSNexploder commented May 21, 2017

works in and 1.7.21 🎉

irb(main):001:0> def go
irb(main):002:1>   raise 'yo'
irb(main):003:1> end
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 milestone May 21, 2017
Copy link
Member Author

@enebo enebo commented May 21, 2017


@enebo enebo closed this as completed May 21, 2017
@kares kares added this to the Invalid or Duplicate milestone May 22, 2017
@kares kares removed this from the JRuby milestone May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

3 participants