-d option prints exceptions to stderr

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>
 
N

nobu.nokada

Hi,

At Tue, 9 Sep 2003 05:48:16 +0900,
Jim said:
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
 
Y

Yukihiro Matsumoto

Hi,

In message "-d option prints exceptions to stderr"

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

No.

matz.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,125
Messages
2,570,748
Members
47,302
Latest member
MitziWragg

Latest Threads

Top