From: Brian Candler Date: 2003-07-27T07:11:34+09:00 Subject: Re: How to rescue any exception in 1.8? Unfortunately the on-line version of the Pickaxe book doesn't have the image which shows the exception hierarchy. There are probably a zillion programs for dumping this out, but here's another one anyway: require 'timeout' class ObjTree def initialize @children = Hash.new([]) ObjectSpace.each_object(Class) do |c| @children[c.superclass] += [c] end end def dumptree(klass, level = 0) puts " "*level + "" + klass.to_s @children[klass].sort {|x,y| x.to_s<=>y.to_s}.each do |c| dumptree(c, level+1) end end end ObjTree.new.dumptree(Exception) # or try Object