-d option prints exceptions to stderr

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>

···


Jim Freeze

One Page Principle:
A specification that will not fit on one page of 8.5x11 inch
paper cannot be understood.
– Mark Ardis

Hi,

···

At Tue, 9 Sep 2003 05:48:16 +0900, Jim Freeze wrote:

Is printing internal exceptions (even those that are caught)
to stderr in debug mode a new feature of 1.8?

No.

$ ruby-1.4 -v -d -e ‘begin raise; rescue; end’
ruby 1.4.6 (2000-08-16) [i686-linux]
Exception `RuntimeError’ at /tmp/rbOACz4X:1


Nobu Nakada

Hi,

···

In message “-d option prints exceptions to stderr” on 03/09/09, Jim Freeze jim@freeze.org writes:

Is printing internal exceptions (even those that are caught)
to stderr in debug mode a new feature of 1.8?

No.

						matz.