Ralph Shnelvar wrote:
> This does not give the call stack with file names and line numbers of 
> the exception.

Use Exception#backtrace:

irb(main):001:0> begin
irb(main):002:1* raise "Error"
irb(main):003:1> rescue => e
irb(main):004:1> puts e.backtrace
irb(main):005:1> end
(irb):2:in `irb_binding'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb/workspace.rb:80:in 
`evaluate'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb/context.rb:216:in 
`evaluate'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb.rb:157:in `block (2 
levels) in eval_input'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb.rb:271:in `signal_status'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb.rb:154:in `block in 
eval_input'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb/ruby-lex.rb:244:in `block 
(2 levels) in each_top_level_statement'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in `loop'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in `block 
in each_top_level_statement'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in 
`catch'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in 
`each_top_level_statement'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb.rb:153:in `eval_input'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb.rb:70:in `block in start'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb.rb:69:in `catch'
/opt/rubies/ruby-1.9.1-p429/lib/ruby/1.9.1/irb.rb:69:in `start'
/home/marvin/Programmieren/Programme/irb_/irb_.rb:37:in `<main>'
=> nil
irb(main):006:0>

Vale,
Marvin
-- 
Posted via http://www.ruby-forum.com/.