From: Yohanes Santoso Date: 2004-11-04T11:16:18+09:00 Subject: Re: Programmatically and dynamically catching exceptions "Robert Klemme" writes: >> class Try >> def execute >> user_proc.call(*user_proc_args) >> rescue Error => e >> elt = (exhandlers.select{|obj| e.class == obj.exception_class})[0] > or raise >> elt.exception_handler.call(e) >> end >> end Nice! But I think I have left out an important factor in the original solution. It shouldn't be e.class == obj.exception_class, but rather e.kind_of?(obj.exception_class). YS.