J
Jim Freeze
Hi
Is printing internal exceptions (even those that are caught)
to stderr in debug mode a new feature of 1.8?
irb -d
irb(main):001:0> def to_num(str)
irb(main):002:1> Integer(str) rescue Float(str)
irb(main):003:1> end
=> nil
irb(main):004:0> to_num("0.25")
Exception `ArgumentError' at (irb):2 - invalid value for Integer: "0.25"
=> 0.25
irb(main):005:0>
irb
irb(main):001:0> def to_num(str)
irb(main):002:1> Integer(str) rescue Float(str)
irb(main):003:1> end
=> nil
irb(main):004:0> to_num("0.25")
=> 0.25
irb(main):005:0>
Is printing internal exceptions (even those that are caught)
to stderr in debug mode a new feature of 1.8?
irb -d
irb(main):001:0> def to_num(str)
irb(main):002:1> Integer(str) rescue Float(str)
irb(main):003:1> end
=> nil
irb(main):004:0> to_num("0.25")
Exception `ArgumentError' at (irb):2 - invalid value for Integer: "0.25"
=> 0.25
irb(main):005:0>
irb
irb(main):001:0> def to_num(str)
irb(main):002:1> Integer(str) rescue Float(str)
irb(main):003:1> end
=> nil
irb(main):004:0> to_num("0.25")
=> 0.25
irb(main):005:0>