Getting the exit code in a SystemExit rescue block?

Assume that I have the following code:

  begin
    exit(42)
  rescue SystemExit => e
    # How do I find out the argument passed to exit() here?
  end

Inside of the `rescue' block, is there any way for me to find out the
argument that was passed to exit()? In this example, I'd want to know
that `42' was passed.

Thanks in advance.

···

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

begin
   exit(42)
rescue SystemExit => e
   # How do I find out the argument passed to exit() here?

     p e.status

end

              matz.

···

In message "Re: Getting the exit code in a SystemExit rescue block?" on Tue, 28 Sep 2004 07:31:30 +0900, Lloyd Zusman <ljz@asfast.com> writes: