From: nobu.nokada@... Date: 2001-12-15T10:51:34+09:00 Subject: [ruby-talk:28574] Re: Blocking exceptions At Sat, 15 Dec 2001 10:09:28 +0900, Thom Harp wrote: > We'd need some more syntax to indicate that I want to ignore that exception, > like maybe declare a block so that if a certain exception is raised from a > function called within that block, control resumes normally where that function > would have returned to the block, like: > > trap('SIGCHLD') do > ignore(Errno::ECHILD) do > while( (pid = Process.waitpid(-1,Process::WNOHANG))) > end > end > end > > Or is there a way I could code this in Ruby? def ignore(exc) yield rescue exc end Nobu Nakada