From: ara.t.howard@... Date: 2006-03-09T12:06:06+09:00 Subject: Re: catch throw ? On Thu, 9 Mar 2006, Paatsch, Bernd wrote: > > Hello, > > I just started using catch and throw. Therefore this question might be an > easy one. > > I have multiple ruby files. In one of the files I like to throw and then in > the main function in a different file I like to catch the throw. Is this > possible or do throw/catch need to be in the same file? > > > Example: > fileOne.rb > > def somefunct > .... > throw :quit_script > .... > end > > fileTwo.rb > catch :quit_script > ... > end > > Thx, > Bernd harp:~ > cat a.rb p catch('answer'){ load 'b.rb' } harp:~ > cat b.rb throw 'answer', 42 harp:~ > ruby a.rb 42 hth. -a -- knowledge is important, but the much more important is the use toward which it is put. this depends on the heart and mine the one who uses it. - h.h. the 14th dali lama