On 10/25/05, Yohanes Santoso <ysantoso-rubycore / jenny-gnome.dyndns.org> wrote:
> Would you accept a patch to provide nested Exception?
>
> def remove_user(name)
>   begin
>     File.unlink('something')
>     more_exception_throwing_method_calls
>   rescue
>     raise UserManagementFailure.new("unable to remove user #{name}", $!)
>   end
> end

Doesn't this already work? Example:

  def example
    begin
      raise "Random error"
    rescue
      raise "Example failed"
    end
  end

  begin
    example
  rescue Exception => e
    puts e
  end

The output I get is "Example failed".

  $ ruby --version
  ruby 1.8.2 (2005-04-11) [i386-linux]

Or am I misunderstanding your question?

Jacob Fugal