[Rails] printing stacktrace
I am trying the following in the irb console
begin
a = 4
a.dfsdfadsf
rescue => exp
puts exp.backtrace.join("\n")
else
puts "in else"
ensure
puts "ensure"
end
I am hoping to see a stacktrace of exception complaining about
method_missing for Fixnum but instead I get
(eval):3:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/interactive_editor-0.0.4/lib/
interactive_editor.rb:33:in `edit'
/usr/local/lib/ruby/gems/1.8/gems/interactive_editor-0.0.4/lib/
interactive_editor.rb:42:in `edit'
/usr/local/lib/ruby/gems/1.8/gems/interactive_editor-0.0.4/lib/
interactive_editor.rb:80:in `ed'
(irb):32:in `irb_binding'
/usr/local/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
/usr/local/lib/ruby/1.8/irb/workspace.rb:52
Is this a problem with interactive editor or am I not doing it right?
Thanks
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home