From: ts Date: 2001-05-15T21:35:31+09:00 Subject: [ruby-talk:15159] Re: How do I catch unsuspecting errors: >>>>> "J" == Jim Freeze writes: J> begin J> a = nil # setup an error J> a.each {|i| puts i} J> rescue J> puts J> end J> But of course, rescue does not catch this type of error. By default rescue catch StandardError, if you want to catch another error you must explicit give its name. For example in your case begin a = nil # setup an error a.each {|i| puts i} rescue NameError puts "Error #$!" end Guy Decoux