Stack traces for exceptions do not show the correct line number
---------------------------------------------------------------

                 Key: JRUBY-2513
                 URL: http://jira.codehaus.org/browse/JRUBY-2513
             Project: JRuby
          Issue Type: Bug
          Components: Interpreter
    Affects Versions: JRuby 1.1+
         Environment: Jruby from source, OSX
            Reporter: David Koontz


When an exception occurs, the stack trace shows everything up to the last 
method that was called.  This is true of instance and class methods.  Run this 
example in MRI and JRuby and you'll see the missing call.

class Foo
  def self.blow_up
    1 + "foo"
  end
  
  def self.delayed_blow_up
    bar = Bar.new
    bar.blow_up
  end
end

class Bar
  def blow_up
    1 + "foo"
  end
end

puts "Calling class method Foo.blow_up"

begin
  Foo.blow_up
rescue => e
  puts e.backtrace
end

puts "Calling class method Foo.delayed_blow_up which in turn calls Bar#blow_up"

begin
  Foo.delayed_blow_up
rescue => e
  puts e.backtrace
end

puts "Calling Bar#blow_up"

begin
  b = Bar.new
  b.blow_up
rescue => e
  puts e.backtrace
end

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to