From: Joel VanderWerf Date: 2008-02-11T05:22:23+09:00 Subject: Re: Timeout::Error Daniel DeLorme wrote: > What about the reverse problem? A lazy programmer might do a catch-all > rescue which would then catch unexpected inner exceptions which were not > meant to be rescued. i.e. > > begin > Timeout.timeout(1) do > 1 / 0 #oops! > end > rescue > #silently ignore timeout > #...but ignores division by zero too! > end That problem is already with us: data = [] # Oops! file = "/etc/passwd" begin File.open(file) do |f| data.concat f.gets end rescue puts "failed to read #{file.inspect}" end -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407