[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Getting the exit code in a SystemExit rescue block?

Mehr, Assaph (Assaph)

9/27/2004 10:38:00 PM


> Assume that I have the following code:

> begin
> exit(42)
> rescue SystemExit => e

p e.status

> # How do I find out the argument passed to exit() here?
> end





1 Answer

Lloyd Zusman

9/27/2004 10:46:00 PM

0

"Mehr, Assaph (Assaph)" <assaph@avaya.com> writes:

>> Assume that I have the following code:
>
>> begin
>> exit(42)
>> rescue SystemExit => e
>
> p e.status

Aha! Thank you very much.


>> # How do I find out the argument passed to exit() here?
>> end


--
Lloyd Zusman
ljz@asfast.com
God bless you.