[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Debugging Threads

Robert Klemme

9/24/2003 2:28:00 PM

Hi all,

people have problems debugging threads. What do others think about,
setting abort_on_exception to true if ruby's command line option -d is
set? That would terminate the whole process if there is an exception in a
thread, which some regard helpful.

What do others think?

robert

1 Answer

ts

9/24/2003 2:43:00 PM

0

>>>>> "R" == Robert Klemme <bob.news@gmx.net> writes:

R> people have problems debugging threads. What do others think about,
R> setting abort_on_exception to true if ruby''s command line option -d is
R> set? That would terminate the whole process if there is an exception in a
R> thread, which some regard helpful.

This is a good idea, and because it''s a good idea it''s already implemented

svg% ruby -e ''Thread.new { a + 1 }''
svg%

svg% ruby -de ''Thread.new { a + 1 }''
Exception `NameError'' at -e:1 - undefined local variable or method `a'' for main:Object
-e:1: undefined local variable or method `a'' for main:Object (NameError)
from -e:1:in `initialize''
from -e:1:in `new''
from -e:1
svg%



Guy Decoux