From: Alan Chen Date: 2002-07-19T14:41:21+09:00 Subject: Re: Can you only catch errors one level deep? On Fri, Jul 19, 2002 at 10:01:29AM +0900, Philip Mak wrote: > That's why I'm thinking that the ability to only catch errors that are > one level deep may be useful. I'm still not sure what this gets you. In production code, if you're doing extra work to only error correct one level deep, you still have an error which will cause the program to crash with a backtrace -- arguably the same backtrace it would have crashed with had you not limited your rescue one level deep. If you're debugging it's more useful, buy I think that having asserts and logging setup against all rescues might be a better approach, just to get an idea of your code is tripping any rescue clauses frequently. Hmm, is there a way to hook into the rescue clauses to automatically log all rescue events? A callback might be nice. Maybe I'll poke around and see if anything interesting occurs to me. -- Alan Chen Digikata LLC http://digikata.com