Hi Sean,

On 12/8/05, Sean O'Halpin <sean.ohalpin / gmail.com> wrote:
> On 12/8/05, Jeffrey Moss <jeff / opendbms.com> wrote:
> > rescue Exception
> >
> > All exceptions descend from class Exception.
> >
> That's not quite true...
> There is a forest of exceptions not a tree. To capture an exception
> generally, you have to specify which family you want to intercept.

I don't think that's correct.  Exceptions do form a tree, and rescuing
"Exception" will rescue all exceptions.  I found your examples a
little confusing because you're doing different things in the rescue
clauses.  If we change the rescue clauses to be the same:

begin
  eval "foo *"
rescue SyntaxError
  puts "I got here"
end

versus

begin
  eval "foo *"
rescue Exception
  puts "I got here"
end

The output is the same in both cases, "I got here".

Take care,

Wayne

---
Wayne Vucenic
No Bugs Software
"Ruby and C++ Agile Contract Programming in Silicon Valley"