From: Wayne Blair Date: 2001-05-16T00:10:09+09:00 Subject: [ruby-talk:15169] Re: How do I catch unsuspecting errors: > 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 Class Exception is the superclass of all Exceptions, so you could rescue Exception and catch all of them (though this is often considered the worst practice, because it can keep you from really polishing your code). begin a = nil # setup an error a.each {|i| puts i} rescue Exception puts "Error #$!" end